The Condition node routes the workflow to different branches based on a condition. Evaluate data from previous nodes and take the appropriate path. Only one branch executes per condition evaluation.Condition nodes are the decision points in your workflows. They enable dynamic routing based on data, creating adaptive workflows that respond to different scenarios intelligently.
The condition expression is evaluated using data from the variable store. The expression returns true or false.
2
Choose branch
If the condition evaluates to true → execute the “true” branch
If the condition evaluates to false → execute the “false” branch
3
Execute chosen branch
Only one branch executes. The other branch is skipped entirely.
4
Continue workflow
After the chosen branch completes, the workflow continues to the next node after the Condition node.
Condition nodes enable dynamic, adaptive workflows. The same workflow definition can handle different scenarios by routing through different branches based on runtime data.
Define the activities to execute when the condition is false. The false branch structure is identical to the true branch.Example false branch: Auto-processingWhen risk score is low, auto-process:
// Check if variable existsexists({{agent.output.optional_field}})// Check if variable is emptyisEmpty({{agent.output.findings}})// Check if variable is nullisNull({{agent.output.result}})// Check if variable is defined (not null and not empty)isDefined({{agent.output.data}})
Scenario: Different handling based on whether request arrives during business hours.Condition:
Copy
{{trigger.received_hour}} >= 9 AND {{trigger.received_hour}} < 17 AND {{trigger.received_weekday}} != "Saturday" AND {{trigger.received_weekday}} != "Sunday"
True branch (business hours):
Copy
Immediate processing: → Agent: "Process request" → Tool: "Assign to available team member" → Tool: "Send immediate response"
False branch (after hours):
Copy
Queued processing: → Tool: "Add to queue" → Tool: "Send auto-reply: Will process during business hours" → (Schedule for next business day)
Complex conditions are hard to debug. Break complex logic into multiple Condition nodes rather than one giant expression.Good: Chain of simple conditions
Poor:((A > 5 AND B < 10) OR (C == "value" AND D != "other")) AND NOT (E > 100 OR F < 0)
Validate data exists before comparing
Always check that variables exist before using them in conditions. Use exists() or isDefined() checks.
Copy
exists({{agent.output.score}}) AND {{agent.output.score}} > 0.8
Use descriptive branch names
Name branches based on what they do, not just “true” and “false”. Good names: “High risk processing” vs “Standard processing”.
Add comments to complex conditions
In the visual editor, add notes explaining what complex conditions check for. Future you will appreciate it.
Test both branches
Always test workflows with data that triggers both the true and false branches. Don’t just test the happy path.
Use condition nodes for business logic
Condition nodes implement business rules in a visible, maintainable way. Don’t hide business logic inside agent prompts.
Consider default fallback branches
If a condition might fail to evaluate (due to missing data), add a fallback path that handles the error gracefully.
Combine Condition nodes with Human Task nodes for approval workflows. Route high-risk items to human review while auto-processing low-risk items. This balances automation with human oversight.