update_automation
Edit an automation. Omit anything you don't want to change.
Setting any one of trigger_type/post_target/post_ids/keywords/ keyword_match merges it onto the automation's existing trigger rather than replacing the whole thing — changing just post_ids to add one more reel doesn't reset trigger_type or keywords back to defaults. Same for ai_goal/ai_context/ai_exit_condition/ai_tone/ai_link against the existing ai config.
Setting public_reply_messages/private_dm_messages merges onto the existing action list the same way the trigger/ai fields above do — editing just the DM text keeps the public-reply messages and every button on the DM card (links, PDF, carousel) exactly as they were; you don't need to pass them again to keep them.
dm_link_button_url merges onto the private_dm action the same way: set it (https://...) to turn the DM into a tappable link-button card instead of plain text, or pass "" to remove the button and go back to plain text. Don't leave the URL typed into private_dm_messages as well when using this.
dm_buttons replaces the WHOLE button list on the DM card in one go — pass it when the automation needs more than a single link, a PDF button, or a product carousel (see create_automation for the shape). Pass [] to strip every button. Omitting dm_buttons (even while setting private_dm_messages) leaves the existing buttons untouched.
dm_link_button_label sets the button's visible text, under the same rule as create_automation: pass it only when the user has told you the exact wording, never something you derived from the link itself. Leave it unset and a button being added for the first time reads "Click here", while an existing button keeps the label it already has.
follow_up_enabled/follow_up_delay_seconds/follow_up_message edit the second "did you get it?" DM (see create_automation for the limits) and merge onto the existing follow-up the same way — pass follow_up_enabled= false to turn it off while keeping its text for later.
status="active" re-runs every plan/conflict check this automation's current config would need, so re-activating a grandfathered or since-conflicting automation can still fail — relay the message. create_automation leaves a new automation paused, and this is how it goes live. Switching it on needs user_confirmed=true.
user_confirmed: required (true) whenever status="active". Set to true only after the user has seen the automation's trigger, targeting and message text and said yes. Not needed for status="paused" or for other edits.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>",
"automation_id": "<automation_id>"
},
"name": "update_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| status | No | ||
| ai_goal | No | ||
| ai_link | No | ||
| ai_tone | No | ||
| keywords | No | ||
| post_ids | No | ||
| ai_context | No | ||
| dm_buttons | No | ||
| post_target | No | ||
| ice_breakers | No | ||
| trigger_type | No | ||
| workspace_id | Yes | ||
| automation_id | Yes | ||
| keyword_match | No | ||
| ask_for_follow | No | ||
| user_confirmed | No | ||
| ai_exit_condition | No | ||
| follow_up_enabled | No | ||
| follow_up_message | No | ||
| dm_link_button_url | No | ||
| follow_gate_message | No | ||
| ice_breaker_replies | No | ||
| private_dm_messages | No | ||
| dm_link_button_label | No | ||
| public_reply_messages | No | ||
| follow_up_delay_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| stats | No | What happened after this automation ran. `dms_failed` is a send that was tried and did not land (dead token, Meta rate limit, policy rejection) — read it next to `events_received` before concluding an automation 'works'. | |
| status | Yes | ||
| ai_goal | Yes | ||
| ai_link | Yes | ||
| ai_tone | Yes | ||
| stalled | No | ||
| dms_sent | Yes | ||
| keywords | Yes | ||
| post_ids | Yes | ||
| ai_context | Yes | ||
| dm_buttons | No | ||
| post_target | Yes | ||
| ice_breakers | Yes | ||
| trigger_type | Yes | ||
| keyword_match | Yes | ||
| ask_for_follow | Yes | ||
| ai_exit_condition | Yes | ||
| follow_up_enabled | No | ||
| follow_up_message | No | ||
| dm_link_button_url | Yes | ||
| follow_gate_message | Yes | ||
| ice_breaker_replies | No | ||
| private_dm_messages | Yes | ||
| public_replies_sent | Yes | ||
| dm_link_button_label | Yes | ||
| public_reply_messages | Yes | ||
| follow_up_delay_seconds | No | ||
| ice_breakers_sync_error | No |