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

NameTypeRequiredDescription
syncstringNotrue waits for the run to finish and returns it with its final status and response_body.

Body

NameTypeRequiredDescription
automation_idintegerYesAutomation to run.
organization_idintegerYesYour organization ID.
initial_payloadobjectNoInput data for the automation's nodes.
conversation_idintegerNoConversation the run is about. The start and end of the run are logged in the conversation.
ticket_idintegerNoSupport ticket the run is about. The run is logged in the ticket.
contact_idintegerNoContact the run is about.
triggered_by_user_idintegerNoUser 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

StatusWhen
400 Bad RequestA required field is missing, an unknown field was sent, or the organization reached its plan's automation run limit.
500The automation does not exist.

Report an issue with this documentation

Please log in to report issues with our documentation.