Run an automation
Start a run of an automation with your own input data. By default the request returns immediately with status: pending and the automation runs in the background; add ?sync=true to wait until it finishes.
Endpoint
POST/automations-executions
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
sync | string | No | true waits for the run to finish and returns it with its final status and response_body. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
automation_id | integer | Yes | Automation to run. |
organization_id | integer | Yes | Your organization ID. |
initial_payload | object | No | Input data for the automation's nodes. |
conversation_id | integer | No | Conversation the run is about. The start and end of the run are logged in the conversation. |
ticket_id | integer | No | Support ticket the run is about. The run is logged in the ticket. |
contact_id | integer | No | Contact the run is about. |
triggered_by_user_id | integer | No | User to record as the one who started the run. |
Unknown fields are rejected with 400 Bad Request.
Request
Run an automation on a conversation, giving it the conversation, the contact and recent messages (the same payload the app's "Run automation" action builds):
Wait for the result:
Response
The execution:
json
With sync=true, status is completed or failed and response_body holds the output of the last node. Poll Get an execution to follow a background run.
Errors
| Status | When |
|---|---|
400 Bad Request | A required field is missing, an unknown field was sent, or the organization reached its plan's automation run limit. |
500 | The automation does not exist. |
Report an issue with this documentation
Please log in to report issues with our documentation.