smartchat

run_automation

Starts an active automation of the trigger type api_call for one contact. Call it without plan_id for the preview, then with the plan_id and a different idempotency_key. If the start fails, the plan stays valid.

Tool namerun_automation
Permissionautomations:run
readOnlyHintfalse
destructiveHintfalse
idempotentHinttrue
openWorldHinttrue
REST callPOST /v1/automations/{automation_id}/runs

#What it does

  • Sends WhatsApp messages to contacts.
  • Needs a confirmation step (a preview first).
  • Safe to repeat with the same idempotency_key.

#Input

The tool takes one flat object. Path, query and body fields of the REST call are merged into it.

NameTypeRequiredDescription
automation_idstringyesAutomation ID.
contactobjectyesThe contact. A phone number or an email is needed.
contact.phonestringnoPhone number in E.164 format. up to 16 characters; format e164
contact.emailstringnoEmail address. up to 254 characters; format email
contact.namestringnoName of the contact. up to 120 characters
dataobjectnoValues for the {{variables}} the automation uses (up to 30 fields; names the automation does not use or the system reserves are refused; values up to 100 characters, no line break, no web address). The preview shows whether the contact is new.
plan_idstringnoPlan ID from the preview call. Without it you get the preview.

Arguments added by the MCP server (see Special arguments)

NameTypeRequiredDescription
idempotency_keystringyesRequired. Unique key for this action, for example a UUID. Same key and arguments within 24 hours: first result, nothing done again. up to 255 characters

#Result

The result has the same content as the REST answer. Lists have at most 50 items per page (default 20); use cursor for the next page.

Errors come back as a tool result with isError: true. The error codes are the ones in Errors.