Steps

After the trigger, add steps to send, wait, branch, and act. Click + between two steps, or use Add a step or run a command at the bottom of the canvas, to open the step list.

The menu of steps you can add to an automation

Send

StepWhat it does
EmailSends an email that you write in the email editor.
SMSSends a text message through Twilio. See SMS.
SlackPosts a message to a Slack channel. See Slack.
WebhookSends a request to a URL, such as your own API.
PushSends a push notification to the person's devices.
MoreSends to one of PostHog's other destinations, such as a CRM.

The Email step has these settings:

  • Message category: lets people opt out of this kind of email. See opt-outs.
  • Track opens and link clicks: on by default. See link tracking.
  • Add UTM tags to links: off by default.
  • Skip the frequency cap: for emails people need on time, such as a welcome email. Opt-outs still apply. See frequency cap.

Wait

StepWhat it does
DelayWaits a set time, such as 2 days, or until a date on the person or event, such as 1 day before trial_ends_at.
Time windowWaits for the next allowed time, such as weekdays from 9 to 5, in a time zone you pick or the person's own.
Wait untilWaits until the person does an event or matches a property condition, up to a Max time to wait. It has one path for a match, and one for the time limit.

A Delay for a set time can last up to 365 days. Max time to wait on a Wait until step can be up to 30 days. Smaller units stop at 24 hours, 60 minutes, and 60 seconds, so 90 minutes counts as 60 minutes.

A Delay until a date works like this:

  • A date in the past continues right away.
  • A date that's missing or can't be read ends the run, whatever the step's Error handling says.
  • If the date moves later while the run waits, the wait follows it. If it moves earlier, the wait still ends on the original date.
  • By default, the run waits at most 30 days past the step, then continues. Set max_delay_duration on the step through the API to change this limit.

A Wait until step resumes only for events from the person in that run. Its filters use fixed values. It can't match an event to a property of the trigger event, such as the same order_id.

A Wait until step with its condition and time limit

Branch

StepWhat it does
Conditional branchSplits people by person properties, event properties, cohorts, or variables. Conditions are checked from top to bottom, and the first match sets the path. People who match no condition take the last path.
Cohort branchSplits people at random by percentage, such as 50/50, to test two versions.

A branch step that sends people down different paths

Act in PostHog

StepWhat it does
Set variableSaves a value for later steps.
Capture eventRecords an event, to start another automation or to measure this one in insights.
Update person propertySets a person property, such as onboarding_stage.
Set group propertySets a property on a group.
Add to static cohortAdds the person to a static cohort.
Opt out of messagesOpts the person out of a message category, or of all marketing messages.

The Support section has Get ticket, Update ticket, and Send message steps for support tickets.

AI

Start an AI task, run a scout, or have Replay Vision watch the person's session. Then branch on the answer. See AI steps.

Settings on every step

Below its main settings, each step has:

  • Conditions: the step runs only for people who match. Everyone else skips to the next step. Branch steps and Wait until don't have this.
  • Output variables: saves the step's result for later steps. See below.
  • Error handling: what happens when the step fails, such as when a message can't be sent. Continue to next step is the default for most steps. Opt out of messages defaults to Exit the workflow, so a failed opt-out never reaches a message step. Exit the workflow ends the run.
The Error handling setting on a step, with Continue to next step and Exit the workflow

Use results in later steps

Save part of a step's result as a variable, such as the ID that a webhook returns:

  1. Open Output variables on the step.
  2. Pick a variable, or type a name to create one, and pick its type.
  3. Set Result path to the part you need, such as body.id. Leave it empty to save the whole result.

Later steps read the variable as {variables.ticket_id}, such as in a webhook or a Slack message. In an email, use Liquid: {{ variables.ticket_id }}. A branch can also split on it.

All of a run's variables together must fit in 5 KB, so save only the fields you need. See email and automation limits for the other limits on a run.

Still have questions?

Was this page useful?