Condition
The Condition node checks one true/false expression and sends the workflow down a True path or a False path.
Screenshot placeholder
The palette describes it as "If/else branching".
When to use it
Use it when the next step depends on a yes or no answer. For example, "was the score high enough?" For more than two outcomes, use a Router or a Switch.
Settings
| Field | What it does | Notes |
|---|---|---|
| Expression | The check to run. It must come out as true or false | Written in Jinja2. Example from the panel: {{ output.score }} > 0.8. A new node starts with that example |
| True branch label | The name shown on the True output | Default True |
| False branch label | The name shown on the False output | Default False |
| If no match | What happens when the check does not come out true | Take false branch (default), Fail workflow or Skip downstream |
The panel also lists the Available variables: {{ input.* }}, {{ output.* }} and {{ env.* }}.
Inputs and outputs
| Handle | Where | Purpose |
|---|---|---|
| Input | Top | The step that comes before |
| true | Right (green) | The path followed when the expression is true |
| false | Left (red) | The path followed when the expression is false |
The node shows your labels next to each output, and the expression inside the diamond.
Example
This is an illustrative example. You are routing support tickets by urgency.
- Set Expression to
{{ output.score }} > 0.8. - Set True branch label to "Urgent" and False branch label to "Normal".
- Connect Urgent to a step that notifies the on-call team, and Normal to a step that files the ticket.
Tips
- Keep expressions short. If you need several rules, a Router is easier to read.
- Choose If no match deliberately. Fail workflow stops the run, and Skip downstream skips the steps after the node.
- Use clear labels. They appear on the canvas and help others follow your workflow.