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

Conditions (filter.conditions[].field), template variables (variables) and contact updates ({ path }) read the run's data by path. A path always starts with a scope: contact., handle., event., steps.<id>.output. or run..

  • A variable is a path ("contact.first_name"), a path with a fallback ({ "path": "event.data.cart_url", "fallback": "https://shop.acme.com/cart" }), or a fixed value ({ "value": "Spring sale" }).
  • Trigger and wait-for-event filters can't read steps.* or run.*: nothing has run yet when they are checked.
  • steps.<id> must name a block that runs before this one.
  • For one block's exact paths in your workspace (your custom contact fields, the payload keys your backend sends, earlier outputs), call GET /v1/automations/catalog?automation_id=…&node_id=….

Conditions

  • Operators: eq, neq, contains, not_contains, starts_with, ends_with, gt, gte, lt, lte, is_set, is_not_set. For dates also within_last_days, more_than_days_ago, within_next_days (value: whole days, 1 to 3,650) and before_now, after_now (no value).
  • A date is ISO 8601 (2026-12-01, read as midnight UTC, or 2026-12-01T09:00:00Z). A missing or unreadable date matches no date operator: "more than 90 days ago" is false for someone who never opened an email. Windows are rolling (N × 24 hours from now).
  • Segment membership puts the segment id in the field: { "field": "contact.segments.seg_…", "operator": "eq", "value": true } (in it) or "value": false (not in it); contact.segments with contains and the id as the value is not membership (it reads a custom field named segments and matches nobody). Topic subscription: { "field": "contact.topics.top_…", "operator": "eq", "value": true }, for every channel's topics alike (their own choice, else the topic's default). Read the ids first (segments and topics); never invent one.
  • Email engagement, read-only: contact.email_stats.last_opened_at, contact.email_stats.last_clicked_at, contact.email_stats.last_sent_at, contact.email_stats.first_sent_at, contact.email_stats.sent, contact.email_stats.delivered, contact.email_stats.opened, contact.email_stats.clicked, contact.email_stats.bounced, contact.email_stats.complained. The dates are empty when it never happened; opens include machine opens, so a click is the stronger signal.
  • A segment or topic a condition names must exist: validate and publish refuse a missing one (pinned to the condition), and deleting or archiving one a live automation uses is refused (409 resource_in_use, naming the automation). If one is gone anyway, the automation pauses (dependency_broken) and you're emailed.
  • Exit rules (policy.exitConditions) are checked before every block, and also as soon as a change to the contact made through the API, the dashboard or an automation arrives (a field update, a segment joined or left, a topic subscribed or unsubscribed): a matching run then ends even mid-wait. A change that sends no event (an import or a migration, a changed field default, engagement, time passing) is judged at the run's next block; a bulk segment or field edit sends one per contact, like a single change. Unsubscribing ends no run by itself: the person stays in, later marketing emails skip and other blocks still run, unless the exit rule has contact.unsubscribed eq true (readiness unsubscribed_stay_in).
  • Relative dates work in automation conditions only; a segment's own rules refuse them. In a segment, contact.segments.… and the like are ordinary custom-field paths. In an automation they mean membership only when the id is a real segment or topic id (seg_…, top_… or a UUID).

Waiting for a date

  • To time a step from a date ("3 days before the trial ends", "24 hours before the appointment"), use Wait until with relativeTo: { "relativeTo": { "path": "contact.trial_ends_at", "offset": "P3D", "direction": "before" }, "timeOfDay": "09:00", "timezone": "contact", "fallbackTimezone": "UTC" }. path is a DATE contact field (contact.<field>) or a key of the trigger event (event.data.<key>); timeOfDay is optional (without it the wait ends at the exact moment).
  • Offsets in days, weeks, months or years keep the local time across daylight saving; hours and minutes are exact (PT24H is 24 real hours). A date field holding a day (stored as midnight UTC) means that calendar day in every time zone. In event data a bare YYYY-MM-DD is that day too, and a value with a time (2026-12-05T09:00:00+09:00, or …T00:00:00Z) is that exact instant: send a bare day when you mean a day.
  • A contact date that changes while a run waits re-times the wait (earlier continues sooner, later waits longer, cleared follows the no-date rule). An event's date is fixed when the run starts: send the event again to move it.
  • No usable date (missing, empty, not ISO 8601): onMissingDate is exit (default, sends nothing more), continue, or branch (wire the no_date handle). Moment already passed when the run gets there, or moved behind by a change: onPassed is continue (default), exit, or branch (wire the passed handle). A moment later than the run can wait (its maxRunDuration, 90 days unless set, or the longest wait) ends the run without sending (wait_date_too_far): raise maxRunDuration for dates months away. The step's output says which: steps.<id>.output.date_status is on_time, passed, missing, invalid or too_far.

Contact

The enrolled contact. Your custom fields are read the same way (contact.plan, contact.company); the catalog with an automation and block id lists this workspace's.

PathTypeMeaning
contact.emailtextThe enrolled contact's email address.
contact.first_nametextFirst name
contact.last_nametextLast name
contact.unsubscribedbooleantrue when the contact opted out of every marketing email.

Segments and topics

Yes / no per segment or topic: compare with eq and true or false. One field per segment (contact.segments.<segment id>) and per topic (contact.topics.<topic id>); the catalog with an automation and block id lists this workspace's.

PathTypeMeaning
contact.segments.<seg_id>booleantrue when the contact is in that segment (a static segment's member, or matching a dynamic segment's rules now).
contact.topics.<top_id>booleantrue when the contact is subscribed to that email or SMS topic (their own choice, else the topic's default).

Email engagement

Read-only lifetime numbers from every email sent to the contact. Dates work with the relative-date operators.

PathTypeMeaning
contact.email_stats.last_opened_atdateWhen they last opened one of your emails (empty if never). Opens include machine opens; a click is the stronger signal. Use with “in the last N days” / “more than N days ago”.
contact.email_stats.last_clicked_atdateEmpty if it never happened. Use with “in the last N days” / “more than N days ago”.
contact.email_stats.last_sent_atdateEmpty if it never happened. Use with “in the last N days” / “more than N days ago”.
contact.email_stats.first_sent_atdateEmpty if it never happened. Use with “in the last N days” / “more than N days ago”.
contact.email_stats.sentnumberA lifetime count across every email sent to them.
contact.email_stats.deliverednumberA lifetime count across every email sent to them.
contact.email_stats.openednumberA lifetime count across every email sent to them.
contact.email_stats.clickednumberA lifetime count across every email sent to them.
contact.email_stats.bouncednumberA lifetime count across every email sent to them.
contact.email_stats.complainednumberA lifetime count across every email sent to them.

Reachability

The contact's primary address or number per channel and its consent state.

PathTypeMeaning
handle.email.statustextACTIVE, PENDING_VERIFY, OPTED_OUT, or UNREACHABLE.
handle.email.addresstextEmail address
handle.email.is_primarybooleanEmail handle is primary
handle.email.consented_atdateWhen express consent was recorded (null if none).
handle.email.verified_atdateEmail verified timestamp
handle.sms.statustextACTIVE, PENDING_VERIFY, OPTED_OUT, or UNREACHABLE.
handle.sms.addresstextPhone number
handle.sms.is_primarybooleanSMS handle is primary
handle.sms.consented_atdateWhen express consent was recorded (null if none).
handle.sms.verified_atdateSMS verified timestamp

This run

Run metadata. Not readable in a trigger filter or a wait-for-event filter.

PathTypeMeaning
run.started_atdateISO-8601 timestamp of enrollment.
run.steps_executednumberSteps executed so far

Event: Contact created

What event.* holds when the trigger is Contact created.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time
event.data.idtextId
event.data.emailtextEmail
event.data.first_nametextFirst name
event.data.last_nametextLast name
event.data.unsubscribedbooleanUnsubscribed

Event: Contact updated

What event.* holds when the trigger is Contact updated.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time
event.data.idtextId
event.data.emailtextEmail
event.data.first_nametextFirst name
event.data.last_nametextLast name
event.data.unsubscribedbooleanUnsubscribed
event.data.changed_fieldstextA list. A condition matches when any one entry does (not equals / does not contain: when none does). As a template value it reads as the entries joined with ", ".
event.data.sourcetextSource

Event: Joined segment

What event.* holds when the trigger is Joined segment.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time
event.data.segment_idtextSegment ID
event.data.segment_nametextSegment name
event.data.contact_idtextContact ID
event.data.emailtextEmail

Event: Left segment

What event.* holds when the trigger is Left segment.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time
event.data.segment_idtextSegment ID
event.data.segment_nametextSegment name
event.data.contact_idtextContact ID
event.data.emailtextEmail

Event: Subscribed to topic

What event.* holds when the trigger is Subscribed to topic.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time
event.data.topic_idtextTopic ID
event.data.topic_nametextTopic name
event.data.contact_idtextContact ID
event.data.emailtextEmail
event.data.sourcetextSource

Event: Unsubscribed from topic

What event.* holds when the trigger is Unsubscribed from topic.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time
event.data.topic_idtextTopic ID
event.data.topic_nametextTopic name
event.data.contact_idtextContact ID
event.data.emailtextEmail
event.data.sourcetextSource

Event: Email activity

What event.* holds when the trigger is Email activity.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time
event.data.email_idtextEmail ID
event.data.totextA list. A condition matches when any one entry does (not equals / does not contain: when none does). As a template value it reads as the entries joined with ", ".
event.data.fromtextFrom
event.data.subjecttextSubject
event.data.created_attextCreated time
event.data.campaign_idtextCampaign ID
event.data.template_idtextTemplate ID
event.data.tags.categorytextCategory
event.data.tagstextTags
event.data.bounce.typetextType
event.data.bounce.sub_typetextSub type
event.data.bounce.categorytextCategory
event.data.bounce.messagetextMessage
event.data.bounce.diagnostic_codetextA list. A condition matches when any one entry does (not equals / does not contain: when none does). As a template value it reads as the entries joined with ", ".
event.data.complaint.feedback_typetextFeedback type
event.data.open.ip_addresstextIp address
event.data.open.user_agenttextUser agent
event.data.open.timestamptextTimestamp
event.data.click.ip_addresstextIp address
event.data.click.linktextLink
event.data.click.user_agenttextUser agent
event.data.click.timestamptextTimestamp
event.data.failed.reasontextReason
event.data.scheduled_attextScheduled time
event.data.batch_idtextBatch ID
event.data.suppressedtextA list. A condition matches when any one entry does (not equals / does not contain: when none does). As a template value it reads as the entries joined with ", ".
event.data.fullbooleanFull
event.data.cctextA list. A condition matches when any one entry does (not equals / does not contain: when none does). As a template value it reads as the entries joined with ", ".
event.data.bcctextA list. A condition matches when any one entry does (not equals / does not contain: when none does). As a template value it reads as the entries joined with ", ".
event.data.message_idtextMessage ID
event.data.thread_idtextThread ID
event.data.reply_totextA list. A condition matches when any one entry does (not equals / does not contain: when none does). As a template value it reads as the entries joined with ", ".
event.data.sent_by_usbooleanSent by us
event.data.texttextThe plain-text body of the received email, quoted replies included, up to 16,000 characters. Empty when the email had no text part. Not set for a copy of one of your own sends (event.data.sent_by_us).
event.data.snippettextA short preview of the new text (about 200 characters, quoted history removed). Not set for a copy of one of your own sends.

Event: Text received

What event.* holds when the trigger is Text received.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time
event.data.sms_idtextSms ID
event.data.fromtextFrom
event.data.totextTo
event.data.bodytextBody
event.data.keywordtextKeyword
event.data.auto_repliedbooleanAuto replied
event.data.looks_like_opt_outbooleanLooks like opt out
event.data.in_reply_totextIn reply to
event.data.contact_idtextContact ID
event.data.received_attextReceived time
event.data.created_attextCreated time
event.data.participant_opted_outbooleanParticipant opted out
event.data.sender_idtextThe id (snum_…) of your number the person texted. event.data.to is the number itself.

Event: Custom event

Your backend's payload is read as event.data.<key>. event_definitions_list (GET /v1/events/definitions) lists the keys it has seen. Unitpost adds two keys of its own, over a payload key of the same name: event.data.email and event.data.contact_id, the contact the event names (in a run, the contact it started for, one the event made included), plus event.data.create_contact: false when the event opted out.

PathTypeMeaning
event.typetextEvent type
event.sourcetextEvent source
event.created_atdateEvent time

Earlier block: Send email

Read as steps.<blockId>.output.<key> by blocks after a Send email block.

PathTypeMeaning
steps.<id>.output.channeltextAlways "email" for this block.
steps.<id>.output.statustextqueued = handed to the sending gate, scheduled = future send time, skipped = not sent (see skip_reason).
steps.<id>.output.skip_reasontextWhy the email was not sent; null when it was. unsubscribed: they unsubscribed from all marketing email; not_subscribed: they aren't subscribed to the email's topic; suppressed: the address is on the suppression list; frequency_capped: the daily marketing cap; no_email_handle: no address; missing_template_variables: a template value had no value; stale_hold: held by a marketing pause more than 7 days.
steps.<id>.output.addresstextThe recipient address used.
steps.<id>.output.handle_idtextThe contact's email handle id (null for a fixed to recipient).
steps.<id>.output.message_idtextThe sent email's id once queued; null when skipped. Read here without its prefix; a run read shows it as email_….
steps.<id>.output.provider_message_idtextProvider message id, assigned asynchronously, so null at send time. Wait for email.delivered before branching on it.
steps.<id>.output.marketingbooleantrue when this send counted as marketing (honors unsubscribe + the daily cap); false for transactional and fixed-recipient sends.

Earlier block: Send SMS

Read as steps.<blockId>.output.<key> by blocks after a Send SMS block.

PathTypeMeaning
steps.<id>.output.channeltextAlways "sms" for this block.
steps.<id>.output.statustextqueued = accepted by the SMS send path, scheduled = accepted for a later send time (the send path holds it until then), skipped = not sent (see skip_reason).
steps.<id>.output.skip_reasontextWhy the SMS was not sent; null when it was.
steps.<id>.output.addresstextThe E.164 number used.
steps.<id>.output.handle_idtextThe contact's phone handle id.
steps.<id>.output.message_idtextThe message id once queued; null when skipped. Read here without its prefix; a run read shows it as sms_….
steps.<id>.output.marketingbooleantrue when classified as marketing (consent-gated).

Earlier block: Update contact

Read as steps.<blockId>.output.<key> by blocks after a Update contact block.

PathTypeMeaning
steps.<id>.output.changed_fieldsunknownField keys whose value actually changed (a no-op update leaves this empty).
steps.<id>.output.opt_out_keptbooleantrue when unsubscribed: false was not applied: the contact unsubscribed themselves and their own action didn't start this run (AUTOMATIONS.md D25). The block's other fields still changed.
steps.<id>.output.skip_reasontextcontact_opted_out when keeping their opt-out left nothing to change (the step is skipped).

Earlier block: Change topic subscription

Read as steps.<blockId>.output.<key> by blocks after a Change topic subscription block.

PathTypeMeaning
steps.<id>.output.topic_idtextThe topic acted on (a run read shows it as top_…).
steps.<id>.output.optextWhich operation ran.
steps.<id>.output.changedbooleanfalse when the contact already had this subscription state (safe no-op), or the subscribe was refused.
steps.<id>.output.skip_reasontextcontact_opted_out when a subscribe was refused (step skipped): the contact unsubscribed from this topic themselves and their own action didn't start this run (AUTOMATIONS.md D25).

Earlier block: Add/remove from segment

Read as steps.<blockId>.output.<key> by blocks after a Add/remove from segment block.

PathTypeMeaning
steps.<id>.output.segment_idtextThe static segment acted on (a run read shows it as seg_…).
steps.<id>.output.optextWhich operation ran.
steps.<id>.output.changedbooleanfalse when membership was already in the requested state.

Earlier block: Call webhook

Read as steps.<blockId>.output.<key> by blocks after a Call webhook block.

PathTypeMeaning
steps.<id>.output.response_codenumberHTTP status your endpoint returned (2xx).

Earlier block: Wait

Read as steps.<blockId>.output.<key> by blocks after a Wait block.

PathTypeMeaning
steps.<id>.output.waitedbooleantrue once the wait elapsed.
steps.<id>.output.skipped_by_userbooleantrue when a person skipped the rest of the wait ("Skip wait"); absent when it elapsed on its own.

Earlier block: Wait until

Read as steps.<blockId>.output.<key> by blocks after a Wait until block.

PathTypeMeaning
steps.<id>.output.waitedbooleantrue once the wait ended (or its moment had passed); false when a date to wait for was missing.
steps.<id>.output.passedbooleantrue when the date (plus offset) had already passed as the run reached the block, or a change moved it behind, so it didn't wait.
steps.<id>.output.date_statustextWaits on a contact or event date only: "on_time" (it waited for the moment), "passed", "missing" (no date), "invalid" (not an ISO date) or "too_far" (later than the run can wait; the run ended).
steps.<id>.output.datetextWaits on a contact or event date only: the date value read, as stored.
steps.<id>.output.skipped_by_userbooleantrue when a person skipped the rest of the wait ("Skip wait").

Earlier block: Wait for event

Read as steps.<blockId>.output.<key> by blocks after a Wait for event block.

PathTypeMeaning
steps.<id>.output.resumed_bytext"event" when the awaited event arrived, "timeout" when the wait expired.
steps.<id>.output.skipped_by_userbooleantrue when a person skipped the wait ("Skip wait"): the run took the timeout path early.
steps.<id>.output.event_idtextId of the event that ended the wait (null on timeout).
steps.<id>.output.event.idtextevent.id
steps.<id>.output.event.typetextEvent type, e.g. email.opened or order.completed.
steps.<id>.output.event.sourcetextWho emitted it.
steps.<id>.output.event.created_attextISO-8601 timestamp.

Earlier block: If / else

Read as steps.<blockId>.output.<key> by blocks after a If / else block.

PathTypeMeaning
steps.<id>.output.matchedbooleantrue → took the yes handle.

Earlier block: Multi-branch

Read as steps.<blockId>.output.<key> by blocks after a Multi-branch block.

PathTypeMeaning
steps.<id>.output.branchnumber1-based index of the branch taken; null when the else path ran.
steps.<id>.output.labeltextThe taken branch's label, if it has one.

Search docs and guides

Search the docs and product guides.