InvokeUrl API Call failing from Deluge Script in ZOHO Flow

InvokeUrl API Call failing from Deluge Script in ZOHO Flow

Hello,

I have been wrestling with an API call placed from a ZOHO Flow via a Deluge Script. For some reason, only calls that contain nested JSON structures seem to be failing. When I say fail, I get a response saying that API parameters are missing when they in actuality exist. Here is a comparison of the test between the output of a Deluge Custom function and Postman. 

I took the JSON from the debug output of the failed InvokeUrl call on the left and pasted it unchanged into Postman and the exact same JSON body worked in Postman without any issues with an HTTP 201 Created message! From the JSON body you can see that it contains a nested JSON structure named SpecificContent.

Likewise, I tested another API call that also contains a nested JSON, and the call failed with a similar message saying parameters are missing. But I have tested these API calls on two other platforms and they work without issues.



Here is the screen grab of the ZOHO script. I have tested several ways of composing the body and also tried using postUrl in place of invokeUrl without success.

Can you please let me know what is it I am doing wrong?