---
title: Workflows
description: Automate a response to a billing event with a trigger, conditions, and steps.
domain: workflow
status: shipped
visibility: public
last_verified: 2026-07-11
order: 10
---
A workflow watches for something to happen and then does something about it, without a person in the loop. Email a customer when their payment fails. Tag an account when it upgrades. Pause a subscription at the end of a contract. You build a workflow from three parts: a trigger, some conditions, and a set of steps.

```viz workflow-example
```

## What starts a workflow: the trigger

Every workflow starts on a trigger. There are three kinds:

| Trigger | Starts the workflow when |
|---|---|
| Event | Something happens, like a payment failing or a subscription being created. |
| Schedule | A time comes around, on a recurring schedule in your timezone. |
| Date offset | A set time before or after a date, like three days before a contract ends. |

A workflow is scoped to a module, the kind of record it is about, such as a customer or a subscription. The module decides which triggers and fields are available.

## Deciding what to do: conditions

A condition checks the record before acting. You can require that all of a set of checks pass, or that any one of them does. "The invoice is over $100 and the customer is on the Pro plan" is a condition that must match before the steps below it run. A condition branches: one set of steps runs when it matches, another when it does not.

## The steps

The steps are what the workflow does. A step is one of:

| Step | What it does |
|---|---|
| Action | Does something, like sending an email or applying a credit. See [workflow actions](/guide/automation/workflow-actions). |
| Condition | Branches into a "matched" path and a "did not match" path. |
| Delay | Waits a set amount of time, then continues. |
| Wait for an event | Pauses until something happens, like the invoice being paid, or until a timeout. |
| Approval | Pauses until a teammate approves or rejects it, for steps you want a human to sign off on. |

These combine into a tree. A workflow can send an email, wait for the invoice to be paid, and if it is not paid within a week, ask a teammate to approve a write-off.

## Edge cases

- **A workflow is scoped to one module.** Its trigger and its condition fields come from that module.
- **Waits and delays are durable.** A workflow can pause for days waiting for an event, then pick up exactly where it left off.
- **An approval step means a human decides.** Use it to make sensitive automations safe rather than banning them.
