Conditions
Make decisions and branch your workflow based on data
Conditions let your workflow make decisions. Instead of always doing the same thing, conditions check values and route to different paths.
Condition Types
| Condition | What it does |
|---|---|
| If/Else | Two paths: one if true, one if false |
| Switch | Multiple paths based on a value |
| Filter | Continue only if criteria are met |
If/Else
The most common condition. Compares a value using an operator and routes to one of two paths.
Configuring If/Else
In the workflow editor, configure the condition using the form:
- Value — The data to check (e.g.,
{{steps.extract.amount}}) - Operator — How to compare:
equals/not equalsgreater than/less thangreater than or equal/less than or equalcontains/not containsstarts with/ends withis empty/is not empty
- Operand — The value to compare against (e.g.,
1000)
Example: To check if an amount exceeds 5000:
- Value:
{{steps.extract.amount}} - Operator:
greater than - Operand:
5000
Switch
When you have more than two options, use Switch instead of nested If/Else.
Good for routing based on categories, types, or status values:
trigger.departmentThen define cases: sales one path, support another, default fallback.
Filter
Filters stop the workflow if the condition is false. Useful for:
- Ignoring duplicate events
- Skipping irrelevant data
- Early exit conditions
!steps.check_duplicate.is_duplicate
trigger.amount > 0Writing Condition Expressions
Conditions use the same expression syntax as other fields. See Expressions for the full reference.
Common patterns:
| Pattern | Expression |
|---|---|
| Threshold check | steps.total > 1000 |
| Equality | trigger.type == "invoice" |
| Not empty | trigger.customer_id != "" |
| In list | trigger.category in ["A", "B", "C"] |
| Has property | has(trigger.rush_order) |
| Multiple conditions | a > 10 && b < 5 |
Run your workflow with different test data to verify both branches work correctly.
Merging Paths
Branches can merge back together. Just connect both paths to the same downstream step.
This is common when you want different processing but the same final notification.