Triggers
A Trigger starts a Workflow on an Event, a record entering a state, a Metric crossing a threshold, or a schedule.
A Trigger starts a Workflow on exactly one thing: an Event, a record entering a state, a Metric crossing a threshold, or a schedule. Each start is a new Action.
What you get
- 1Trigger on every inherited Workflow, set before your first saleTrigger
- 1Trigger for each Workflow you add by askingTrigger
- 1Action each time a Trigger fires, with each step’s resultAction
Four kinds
| Kind | Fires when | Written as | Example |
|---|---|---|---|
| Event | an Event happens, optionally only where a condition holds | event, where | Answer a legal notice: Thread.created where intake = 'legal-notices' |
| State | a record enters a state | state | a Subscription entering pastDue |
| Threshold | a Metric stays below or above a value, optionally for a while | threshold | Pivot review: weekly outside revenue growth below 0 for 4 weeks |
| Schedule | a cadence comes due, at a set time on the Startup’s clock | schedule, at | Monday Role review: weekly at mon 09: |
An Event can come from outside: Stripe, GitHub and other connected services arrive as webhooks, checked and written before any Workflow starts.
A schedule is a cadence: hourly, daily, weekly, monthly, quarterly or yearly. at sets the time, such as 03: or fri 10:. Rhythm lists every scheduled Workflow as the operating week.
On demand
A Workflow that should run whenever someone asks has no Trigger. It is the body of one Verb and runs on every call of it, whoever calls: the Founder, an agent or an API client. Issue a refund runs on every Order.refund, Change a plan on every Subscription.switch, and Cancel a subscription on every Subscription.unsubscribe.
Guides
- Automate a workflow, such as a thank-you and a free month for every Customer at one year.
- "Send me the Role review at the end of the week instead." This changes the
roleReview.atSetting.
How it works
One Event can fire many Triggers, and one Trigger starts one Workflow. Each Action ends done, failed, canceled or refused, and the record keeps every one. How a Workflow runs covers what happens after the start.