Webhooks
Integrate a third-party service with just a few simple clicks 🪝
Last updated
Integrate a third-party service with just a few simple clicks 🪝
Last updated
Webhooks represent automated notifications dispatched by applications in response to specific events. These notifications consist of a message or payload in JSON format and are directed to a distinct URL. In Directual, you have the capability to generate these unique URLs for receiving such notifications.
Go to API section → Webhooks → + New webhook and enter system name of a new webhook. In 99% of cases you will need a scenario for parsing incoming objects. Such a scenario can be created automatically right here.
Copy the Webhook URL and use it with your external service to send messages to Directual.
After setting up a webhook, Directual automatically generates the corresponding data structure within the Integrations → Webhooks folder, and you'll also find a convenient link to it in the webhooks table. The first object in this folder is created by Directual for testing purposes.
There are the following fields in the webhook data structure:
id
— usual unique field
body, headers, urlData
— fields in JSON format. One or a few of them contain data (depending on a specific third party service)
Objects coming via Webhooks contain data in JSON-format. The best way to deal with them is to apply JSON-step or to apply templating techniques for parsing JSON.
The default response is:
Occasionally, a third-party system may necessitate a specific response in JSON or even XML format. Fortunately, this is not a limitation, as you have the flexibility to construct any API response you require. Here's how:
Please take note that the scenario needs to be published and run.
Have a look at the API-response step documentation.
Take a look at the tutorial on how to update an existing data table using incoming JSON data: