Introducing body parameter for invokeUrl

Introducing body parameter for invokeUrl

Hello everyone,

We’re excited to announce that the invokeUrl Deluge task now supports body payloads and allows you to send data with all HTTP methods. Previously, GET and DELETE requests couldn’t include a body payload, and this limited your API interactions. This update brings a much-requested enhancement, making API interactions from Deluge more flexible. We believe this will be particularly beneficial when working with external tools like Postman.

What's new?

We've introduced a new parameter, body, in the invokeUrl task, allowing you to send data with any HTTP method. Note that both body and parameter cannot be present in the same invokeURL syntax. 

The body parameter can have one of three data types: TEXT, FILE, or KEY-VALUE. The data types and their supported request formats are:
  • TEXT: The default content type is text/plain. You can override this using headers to specify JSON, HTML, XML, JavaScript, and more.
  • KEY-VALUE: The default content type is multipart/form-data. You can override this using x-www-form-urlencoded.
  • FILE: The default content-type is application/octet-stream. You can override this for application/pdf, image/png, and other relevant file types.
NotesNote: Please be aware that the default content type can be overridden by using the headers parameter.

Example

Assume you're using Zoho Mail to manage your organization's email system, and you've previously added an address (like mysupply@zylker.com) to your whitelist so emails from that sender don’t get flagged as spam. Now let’s say you no longer wish to allow emails from this address and want to remove it from the whitelist.

You can do this using the invokeURL task with the DELETE method and the new body parameter:
Quote
param = {"spamCategory":"whiteListEmail","whiteListEmail":{"mysupply@zylker.com"}};
delet = invokeurl
[
url:"https://mail.zoho.com/api/organization/681774572/antispam/data"
    type:DELETE
    body:param.toString()
    headers:{"content-type":"application/json"}
    connection:"custommail"
];
info delet;

This sends a DELETE request to the Zoho Mail API, specifying that you want to remove the given email from the whitelist.

Help documentation - invokeUrl task
Applicable for - All Zoho services

This enhancement brings greater flexibility to API testing, as Postman now supports multiple request body formats. Other external API tools are expected to follow suit soon. Additionally, server-side parsing enables seamless handling of different request body combinations and enhances your API interactions from Zoho services.

We hope you love this update to the invokeUrl task! If you have any questions or need assistance, feel free to reach out—we're always happy to help.

Until next time!
The Deluge Team
    • Sticky Posts

    • Function #41: Sync Associated Subforms!

      Welcome back everyone! The last custom function showed how to update a Contact with Product details from it's Related list in Deals. This week, let's look at a function that lets you update subform records in two modules simultaneously when one of them is updated. Business scenario Let's look at how subform helps in an education institution that has deployed Zoho CRM. National Public School, Austin (made up, of course!) has set up Zoho CRM and it follows the same relationship pattern of "Students",