Run an automation from a conversation
Start an automation execution with conversation, contact, and recent messages as initial_payload, matching the “Run automation” action in the message composer.
Endpoint
POST/automations-executions
Prerequisite — load context like the app
GET /conversations/:idwithquery: { organization_id }GET /contacts/:contactIdif the conversation hascontact_idGET /conversation-messages-{channel}with:
json
Reverse the data array chronologically when building the payload (the app does this before create).
Request
| Field | Type | Description |
|---|---|---|
automation_id | Number | Automation to run. |
organization_id | Number | Organization scope. |
conversation_id | Number | Conversation thread id. |
initial_payload | Object | At minimum includes conversation, contact (nullable), and messages as built above. |
Response
Returns the created execution record (exact fields depend on server configuration). The app shows a success toast and closes the picker.
Notes
- Unsupported channels: the UI only enables this when a
conversation-messages-{channel}service exists for the conversation’s channel. - Keep
$limitat 50 when loading messages for the payload.
Report an issue with this documentation
Please log in to report issues with our documentation.