Integrate a third-party service with just a few simple clicks 🪝

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.

Creating webhooks

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.

Storing incoming messages

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)

Dealing with incoming messages

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.

Changing API-response

The default response is:

  "result": null,
  "status": "OK"

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:

1. Add a synchronous scenario for your webhook

Please take note that the scenario needs to be published and run.

2. Setup an API-response step in the scenario

Have a look at the API-response step documentation.

Practical tip

Take a look at the tutorial on how to update an existing data table using incoming JSON data:

Last updated