Triggers

The trigger decides who enters an automation, and when. Click the trigger step, then pick a Trigger type.

The trigger types you can start an automation with

Trigger types

People

TriggerStarts when
EventSomeone does something in your product, such as signed_up.
BatchYou click Trigger, or on a schedule. It runs once for each person in an audience you define.
Survey responseSomeone answers a survey.

Systems and schedules

TriggerStarts when
ScheduleA time you set, once or on repeat. It runs with no person or event. Use Batch to reach people on a schedule.
WebhookYour own system sends a request to the automation's URL.
ManualYou click Trigger in the editor.
Tracking pixelSomething loads the automation's 1x1 image, such as a web page or an email.

Tools you already use

TriggerStarts when
Slack message postedSomeone posts in a Slack channel that PostHog is in. See Slack.
GitHub activitySomething happens on a GitHub repository.
SupportA support ticket is created, changes status, is assigned, or gets a message or a private note. Each is its own trigger, such as New ticket created.
Data warehouse row syncedA row is synced into a Data Warehouse table.
Materialized view row updatedA materialized view adds or updates a row.

Event triggers

Add one or more events or actions. Under Additional filters, add conditions that apply to all of them, such as a person property. Turn on Filter out internal and test users to skip your own team.

Below the filters, the trigger shows how many events matched in the last 7 days, so you can see how often it will fire.

An event trigger with its filters

Webhook triggers

Save the automation, and the trigger shows its Webhook URL. Send it a request with any JSON payload. In the trigger's settings, use request.body and request.headers to fill in the event and person for the run.

The request only starts the run. It doesn't record an event in PostHog. To record one, add a Capture event step.

To stop a retried request from starting a second run, send an Idempotency-Key header:

Terminal
curl -X POST "<your-webhook-url>" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{"order_id": "1042"}'

RequestResponse
First request with a key, or no key201 with {"status": "queued"}. The run starts.
Same key again within 4 days200 with {"status": "duplicate"}. No run starts.
Key longer than 255 characters400. No run starts.

Each key applies to one automation. The same key on two automations starts a run on each.

How often one person can enter

Event triggers have a Frequency setting:

OptionWhat it does
Every time the trigger firesEach event starts a new run. This is the default.
One time per periodA person enters once, then not again until the period ends. Pick a period from 5 minutes to 365 days, or ever.
Once per calendar dayA person enters at most once each day.

Use ever for a welcome series. Use a short period when the same event can arrive twice, such as from a server retry.

Account triggers limit entry per account instead of per person.

Frequency is not the same as the frequency cap, which limits marketing messages across all broadcasts and automations.

Conversion goal and exit

Event triggers have a Conversion goal. A person converts when they meet all the conditions you set:

  • Property changes: a person property, such as plan is growth.
  • Events: an event, such as subscription_started.

A person counts as converted only within the Conversion window, which starts when they enter. The default is 90 days. Each conversion is recorded as a $workflows_conversion event, which you can use in insights and cohorts. This event counts toward your event usage.

Event triggers also have an Exit condition:

  • Exit only once workflow reaches the end. This is the default.
  • Exit when trigger filters no longer match.
  • Exit when conversion goal is met.
  • Exit when trigger filters no longer match, or when conversion goal is met.

Limit the sending rate

When the automation has an email step, the trigger also has Email sending rate limit. Turn on Limit sending rate, and set the most emails to send per minute or per hour. This spreads a burst of sends over time. See email and automation limits for the limits that apply to every automation.

Still have questions?

Was this page useful?