Automations
Journeys that start on an event and send, wait, branch and update contacts on their own: the trigger, blocks, exits and policy, and how one goes live.
An automation is a journey that runs on its own: something happens (a contact signs up, your backend sends cart.updated, an email arrives), and each person goes through the steps you set: send an email or a text, wait, branch on what they did, update their contact, call a webhook. Each person's trip through it is a run.
- Trigger: what starts a run. See Automation triggers.
- Blocks: what happens next, wired one after another. See Automation blocks.
- Exits: where a path ends; the run counts as Completed.
- Policy: who can enter again, the frequency cap, a goal that ends the run early, exit conditions. See Automation safety and limits.
How one goes live
- Look before you build. Read the block catalog, the blueprints and the custom events the backend already sends (with their payload keys). Find the real template, topic or segment ids and a sender on a verified domain. Never invent an id, a sender or an event name.
- Save a draft. Start from a blueprint when one fits. Otherwise send the whole graph in one create call. Leave re-entry to the trigger's default unless the person asked for something else. On a custom-event trigger, runs per person at once is the person's call (readiness asks,
runs_per_person): ask whether an event for someone already in the journey should start its own run or be ignored, and setmaxConcurrentRunsPerSubjectfrom their answer (1 for one run per person; up to 10 for a run per event, with each wait and the goal matched to{{event.data.<key>}}). For a once-ever journey (a welcome, onboarding or trial series) also setreEntry: "never". Never set it on your own to make the item go away. A policy read back over the API or MCP lists the fields that came from defaults inpolicy_defaults: leave those out when you send the policy back, or they become choices. A draft never sends anything, and edits replace the graph and the policy whole. - Validate until clean. Validate, fix every error by its node_id and path, and validate again until ok is true (ok is false only with errors). You can check a proposed graph before saving it. Then read readiness: blockers, what the person or their developer still has to provide, and what will surprise them. Relay every needs_input and heads_up item to the person, one line each and counted, before you publish: they are the facts they agree to. A needs_input item owned by the user is a question (
runs_per_person: one run per person, or one per event?): ask it, set what they answer, and validate again before publishing. - Dry run for one contact. Walk the draft for a real or made-up contact: which messages they would get, when, and which branch they would take. Nothing is sent.
- Preview an enrollment (manual trigger only). For a manual-enrollment automation, check whether a contact can be enrolled now and which rule would stop it, before enrolling anyone.
- Publish only when asked. Go live only when the person asks and readiness.ready is true: only a blocker refuses a publish, needs_input and heads_up items don't. Read the publish preview first when people are mid-journey (it doesn't repeat readiness: validate first). For a segment or topic trigger,
?backfill=trueon the preview says how many people already in it a backfill would start; ask, then pass that count asbackfill_count. Publishing needs the automations:publish capability. - Watch the first runs. Read the runs to see who entered and why someone didn't. A run's step timeline names the block it stopped at and the reason.
Describe it instead
Unit and any MCP client can do all of this from one sentence. See Build automations with AI.
In this section
| Page | What's on it |
|---|---|
| Build with AI | Describe a journey to Unit, Claude, ChatGPT or Cursor and get a validated draft: prompts that work and the rules every agent follows. |
| Examples | Complete, tested automations: welcome series, abandoned cart, inbound auto-reply, SMS reminder, re-engagement, plus the blueprints and their params. |
| Triggers | What can start an automation: a custom event, a contact change, a segment or topic, email activity or a manual enrollment, and who can enter again by default. |
| Blocks | Every automation block with its settings, the paths out of it and the data it leaves for later blocks: sends, waits, branches, updates and webhooks. |
| Data and variables | The data paths conditions and template variables read in an automation: the contact, the trigger event, earlier blocks' outputs and the run itself. |
| Safety and limits | The guards every automation runs with: loop guards, frequency caps, re-entry, wait and run limits, live-run ceilings and the permissions each step needs. |
| Testing and going live | Validate, read readiness, dry-run for a contact, preview an enrollment, publish, and what a new version does to people mid-journey. |
| Runs and debugging | Run states, why an automation pauses and what lifts it, and how to find, fix and retry a run that failed without sending anything twice. |
| Events and webhooks | Send custom events from your backend, list the ones you've sent with their payload keys, and get signed webhooks when an automation changes. |
| Billing | What an automation run costs, how many runs each plan includes, the usage notices, and what happens when the included runs are used up. |
| API reference | Every Automations and Events endpoint with request and response examples, after a one-minute start. |
Ids
An automation's id starts with atm_ and a run's with run_.