Automation 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.

Blocks come from the same catalog the validator and the engine use. Action blocks count toward a run's step budget (50 by default) and make the run billable; triggers, waits, branches and exits are free. Publish refuses a path with more action blocks than the budget (path_over_action_limit), and an automation holds at most 100 blocks. GET /v1/automations/catalog returns the same list as JSON.

Send email

action.email.send. Renders a template and sends it to the run's contact (or a fixed address), through the full sending gate.

FieldRequiredValuesMeaning
templateIdYestextPUBLISHED template id (tmpl_… or bare).
fromYestextSender on a verified domain: "Acme <hi@acme.com>" or bare address.
topicIdNotextConsent gate: skip contacts not subscribed to this topic. The global unsubscribe already applies to every marketing template without one; a topic adds a per-topic opt-out (and needs a marketing template).
transactionalNobooleanLeave this out: the template's type (marketing or transactional, set on the template) decides how the email is sent. A value that disagrees with the template is refused at validate and publish; one that agrees is accepted and changes nothing.
toNotextFixed recipient for ops/internal flows. Omit to email the enrolled contact.
subjectNotextSubject override; the template's subject otherwise.
variablesNoobjectTemplate variable → value: a run-context path string, { path, fallback? }, or { value }. E.g. { plan: "contact.plan", cart_url: { path: "event.data.cart_url", fallback: "https://…" } }. first_name and last_name come from the contact and take only a fallback, used when the contact has none: { first_name: { path: "contact.first_name", fallback: "there" } }.
onMissingVariablesNofail, skip"skip" = skip this email when a required template value is missing (default "fail" → onError).
onErrorNofail_run, skip_node, pause_runpause_run (default: the run fails; 3 in a row at this block pause the automation) | fail_run (never pause) | skip_node. Overrides the automation policy for this block.

Paths out: next. Later blocks read steps.<id>.output.channel, steps.<id>.output.status, steps.<id>.output.skip_reason, steps.<id>.output.address, steps.<id>.output.handle_id, steps.<id>.output.message_id, steps.<id>.output.provider_message_id, steps.<id>.output.marketing.

Send SMS

action.sms.send. Sends a text message to the run's contact through the full SMS send path (consent, suppression, sender reach, review). Marketing needs prior consent on record; without it the contact is skipped.

FieldRequiredValuesMeaning
templateIdNotextPUBLISHED SMS template id. Use this OR body.
bodyNotextInline message text with {{variables}} (same vocabulary as templates). Use this OR templateId.
senderIdNotextSender to send from (a live number / Sender ID). Omit to let the server pick one that reaches the contact's country.
typeNoMARKETING, TRANSACTIONAL"MARKETING" (default) needs the contact's prior express consent: no consent = skipped. "TRANSACTIONAL" for receipts / OTP / account notices: ignores marketing consent, still honours STOP and suppression.
variablesNoobjectTemplate/body variable → value: a run-context path string, { path, fallback? }, or { value }.
onMissingVariablesNofail, skip"skip" = skip this SMS when a required variable is missing (default "fail" → onError).
onErrorNofail_run, skip_node, pause_runpause_run (default: the run fails; 3 in a row at this block pause the automation) | fail_run (never pause) | skip_node. Overrides the automation policy for this block.

Paths out: next. Later blocks read steps.<id>.output.channel, steps.<id>.output.status, steps.<id>.output.skip_reason, steps.<id>.output.address, steps.<id>.output.handle_id, steps.<id>.output.message_id, steps.<id>.output.marketing.

Update contact

action.contact.update. Sets or clears contact fields (built-in and custom).

FieldRequiredValuesMeaning
setYesobjectField key → literal value, { path: "event.data.plan" } to read run data, or null to clear. Custom values are coerced to the field's registry type. email cannot be changed. unsubscribed: false is not applied to a contact who unsubscribed themselves (link, preference page, spam report) unless their own reply, text or preference-page subscribe started the run (output opt_out_kept).
onErrorNofail_run, skip_node, pause_runpause_run (default: the run fails; 3 in a row at this block pause the automation) | fail_run (never pause) | skip_node. Overrides the automation policy for this block.

Paths out: next. Later blocks read steps.<id>.output.changed_fields, steps.<id>.output.opt_out_kept, steps.<id>.output.skip_reason.

Change topic subscription

action.contact.topic. Subscribes or unsubscribes the contact from a topic.

FieldRequiredValuesMeaning
topicIdYestextTopic id (top_… or bare).
opYessubscribe, unsubscribeIdempotent: no-op when already in that state. A subscribe never undoes the contact's own opt-out (unsubscribe link, preference page) unless their own reply, text or preference-page subscribe started the run: the step is skipped (contact_opted_out). An opt-out set over the API, an import or the dashboard is reversed.
onErrorNofail_run, skip_node, pause_runpause_run (default: the run fails; 3 in a row at this block pause the automation) | fail_run (never pause) | skip_node. Overrides the automation policy for this block.

Paths out: next. Later blocks read steps.<id>.output.topic_id, steps.<id>.output.op, steps.<id>.output.changed, steps.<id>.output.skip_reason.

Add/remove from segment

action.segment.modify. Adds or removes the contact from a static segment.

FieldRequiredValuesMeaning
segmentIdYestextSTATIC segment id (seg_… or bare); dynamic segments can't be edited.
opYesadd, removeIdempotent: no-op when membership already matches.
onErrorNofail_run, skip_node, pause_runpause_run (default: the run fails; 3 in a row at this block pause the automation) | fail_run (never pause) | skip_node. Overrides the automation policy for this block.

Paths out: next. Later blocks read steps.<id>.output.segment_id, steps.<id>.output.op, steps.<id>.output.changed.

Call webhook

action.webhook.send. Sends a signed POST with the run context to your URL (SSRF-guarded, retried).

FieldRequiredValuesMeaning
urlYestexthttps URL to POST the run context to (private/internal addresses are blocked).
payloadNoobjectStatic key/values merged into the payload's data.
secretNotextSigning secret: requests are signed like Unitpost webhooks (svix-id, svix-timestamp, svix-signature), so your SDK's verifyWebhook checks them with it. Left out on a new block, or "generate", Unitpost generates one (whsec_…) and the write answers it once in generated_secrets; your own must be whsec_ or 22+ base64url characters. null = unsigned. Write-only: reads show a placeholder; send it back (or leave the key out) to keep the stored secret. payload and url are shown on reads: never put a credential in them.
onErrorNofail_run, skip_node, pause_runpause_run (default: the run fails; 3 in a row at this block pause the automation) | fail_run (never pause) | skip_node. Overrides the automation policy for this block.

Paths out: next. Later blocks read steps.<id>.output.response_code.

Wait

flow.wait.duration. Pauses the run for a fixed duration (hours, days, weeks).

FieldRequiredValuesMeaning
durationYestextISO-8601 duration: PT30M, PT4H, P2D, P1W.
alignToNoobjectContinue at a local time after the wait: { timeOfDay: "09:00", timezone: "Europe/Berlin" }.

Paths out: next. Later blocks read steps.<id>.output.waited, steps.<id>.output.skipped_by_user.

Wait until

flow.wait.until. Pauses until a day and time comes round: the next Monday 09:00, the next 18:00, one fixed date, or a date of the contact or the trigger event moved by an offset (3 days before trial_ends_at, 24 hours before appointment_at), in a set time zone or each contact's own. A contact date that changes while the run waits re-times the wait.

FieldRequiredValuesMeaning
weekdayNounknownDay of the week: "monday" … "sunday" (or 0 = Sunday … 6). Omit for the next day the time comes round. Not with date.
dateNotextOne fixed day, "YYYY-MM-DD". Must be in the future when published; a run reaching the block after it continues right away. Not with weekday.
relativeToNoobjectWait until a date of the contact or the trigger event instead: { path: "contact.trial_ends_at", offset: "P3D", direction: "before" }. Not with weekday or date.
timeOfDayNotextLocal time the run continues at, 24-hour "HH:mm". Required, except with relativeTo (absent = the exact moment of the date and offset).
onMissingDateNoexit, continue, branchWith relativeTo: when the date is missing, empty or not an ISO date. "exit" (default) ends the run, "continue" goes on now, "branch" takes the no_date handle.
onPassedNocontinue, exit, branchWith relativeTo: when the moment is already behind the run (or a change moves it behind). "continue" (default) goes on now, "exit" ends the run, "branch" takes the passed handle.
timezoneYestextIANA zone ("America/New_York"), or "contact" for each contact's own timezone field (falls back to fallbackTimezone, else UTC).
fallbackTimezoneNotextWith timezone "contact": the zone for contacts without a valid timezone field (default UTC).

Paths out: next. Later blocks read steps.<id>.output.waited, steps.<id>.output.passed, steps.<id>.output.date_status, steps.<id>.output.date, steps.<id>.output.skipped_by_user. Shape: { weekday?: "monday", timeOfDay: "09:00", timezone: "Europe/Berlin" | "contact", fallbackTimezone?: "UTC" } or { date: "2026-12-24", timeOfDay: "18:00", timezone: "America/New_York" } or { relativeTo: { path: "contact.trial_ends_at", offset: "P3D", direction: "before" }, timezone: "contact" }

Wait for event

flow.wait.event. Pauses until a matching event arrives for this contact, or the timeout elapses.

FieldRequiredValuesMeaning
eventTypeYestextPlatform event (email.opened, email.clicked, …) or your event name (order.completed). Only the run's own contact's events resume it.
filterNoobjectOptional condition on the arriving event (contact.*, handle.*, event.* scopes only).
timeoutYestextGive up after this long and leave via the timeout handle (ISO-8601, e.g. P1D).
ignoreAutomaticMailNobooleanFor email.received: an out-of-office reply, bounce or bulk list mail doesn't end the wait (default true).

Paths out: event, timeout. Later blocks read steps.<id>.output.resumed_by, steps.<id>.output.skipped_by_user, steps.<id>.output.event_id, steps.<id>.output.event.id, steps.<id>.output.event.type, steps.<id>.output.event.source, steps.<id>.output.event.created_at.

If / else

flow.branch.condition. Routes the run by a condition on contact, event, or step data.

FieldRequiredValuesMeaning
filterYesobjectCondition deciding yes/no. Fields: contact.*, handle.<channel>.*, event.*, steps.<upstreamId>.output.*, run.*.

Paths out: yes, no. Later blocks read steps.<id>.output.matched.

Multi-branch

flow.branch.multi. Routes down the first branch whose condition matches, else the fallback.

FieldRequiredValuesMeaning
branchesYesarrayOrdered, first match wins; handles are b1..bN plus else. Each: { label?, filter }.

Paths out: b1, …, bN, else. Later blocks read steps.<id>.output.branch, steps.<id>.output.label.

Exit

flow.exit. Ends the run here as Completed, the end of this path (an optional reason names which end it reached).

FieldRequiredValuesMeaning
reasonNotextShown in the run ledger as why the run ended.

Ends the run.

Triggers are on Automation triggers.

Search docs and guides

Search the docs and product guides.