Create Automation
create-automationBuild a draft automation graph from steps and connections, returning any missing config issues to fix before the user enables it in the dashboard.
Instructions
Create an automation as a draft: a journey each contact who matches the trigger goes through. Send steps and connections to build it, or only name for an empty draft. This server cannot enable or disable an automation: once issues is empty, the user turns it on from the Arsel dashboard. Saving steps messages nobody.
Shape. An automation is a graph. steps holds every step, the trigger included (key trigger), and connections link them by key. A step leaves by default, except a condition (condition_met, condition_not_met) and a wait_for_event (event_received, timeout). A branch with no connection ends the run. Every step must be reachable from the trigger, no connection may lead back to an earlier step, and branches that split must rejoin at one step or not at all. At most 100 steps.
Look up what the steps name before writing them. Tags from list-tags, lists from list-lists, segments from list-segments, email templates from list-templates, sending domains from list-email-domains, SMS senders from list-sms-senders, WhatsApp templates from list-whatsapp-templates, custom properties from list-contact-properties, events from list-events, campaigns from the channel's campaign list tool.
Conditions and waits take a filter in the segment rule format. To react to a message this automation sent, use a message_engagement rule with target_type: automation_step and the send step's key as target_id; that step must always run before.
Drafts may be unfinished. The automation comes back with issues, each naming a step_key and the config path still missing or wrong. Fix them with update-automation. A graph that breaks a rule of the shape above is refused and nothing is saved.
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": {
"name": "<name>"
},
"name": "create-automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| steps | No | Every step, the trigger included. Send it with `connections`; together they replace what was there. | |
| connections | No | Send it with `steps`. |