Workflow Incoming Webhook Triggers
Valid Attributes
| Attribute | Description | Details |
|---|---|---|
| account_id | ID of the account that the incoming webhook trigger belongs to | Cannot be set manually. |
| created_at | Timestamp of creation | Cannot be set manually. |
| token | A token that can be used to trigger the workflow using a web request. See below for details. | Cannot be set manually. |
| updated_at | Timestamp of last update | Cannot be set manually. |
Create
Example response:
{ "data": { "id": "1956840b-04a7-41b8-a298-24d797326611", "type": "workflow_incoming_webhook_trigger", "attributes": { "account_id": "c07d0b6f-e628-4c8f-82ba-b89fdb0284cf", "created_at": "2023-10-15T10:30:00Z", "token": "e6e0e687-0602-4b99-a5f2-d5975063a5d5", "updated_at": "2023-10-15T10:40:00Z" } }}This endpoint adds a new incoming webhook trigger to a workflow. There is no data to be sent, so the request body can be left empty.
HTTP Request
POST /api/v1/workflows/:workflow_id/incoming_webhook_triggers
URL Parameters
| Parameter | Description |
|---|---|
| workflow_id | The ID of the workflow that the trigger will be added to |
Triggering Workflows Using Incoming Webhook Triggers
Example Request:
{ "age": 52, "address": { "street": "Pulse Avenue" }}This endpoint triggers a workflow using an incoming webhook trigger. It is “public”, i.e. you do not have to include authentication data in the request header. The request must be a valid JSON and use one of the following content types:
application/jsonapplication/vnd.api+json
Regardless of content type, the request body is always processed as plain JSON. If a JSON:API–shaped payload is sent, it is not interpreted according to the JSON:API specification.
All top-level and nested fields in the JSON payload are made available to the workflow as input data. For example, when using the payload above in a workflow with an incoming webhook trigger and a “create chat message” action, the following placeholders are available:
{{ workflow_incoming_webhook_trigger_input.age }}{{ workflow_incoming_webhook_trigger_input.address.street }}
It is valid to send an empty request body, in which case the workflow input data will be an empty object.
The workflow execution happens asynchronously. As a consequence, a success response does not indicate successful workflow execution. Check the runs of the workflow to see whether it is succeeding. To communicate the asynchronous behavior, a successful request to this endpoint returns the status code 202 (accepted), not 200.
HTTP Request
POST /public/v1/trigger_workflow/:token
URL Parameters
| Parameter | Description |
|---|---|
| token | The token to trigger the workflow - this is generated by us when creating the incoming webhook trigger |