Switch Node
Routes workflow execution to different branches based on conditions.
Input Fields
Task Name: Descriptive name for this switch node.
Evaluation Parameter: The workflow variable to evaluate. Example: ${workflow.variables.amount}.
Cases: Define multiple conditional branches. Each case has:
- Condition: JavaScript expression that returns true/false. Example:
${workflow.variables.amount} > 1000 - Branch Tasks: Tasks to execute when this condition is true
Default Case: Tasks to execute if no conditions match (always include this as a fallback).
How It Works
- Evaluates conditions in the order they are defined
- Executes the first matching branch
- Falls through to default case if no conditions match
- Only one branch executes per switch node
Tips:
- Order conditions from most specific to most general
- Always include a default case to handle unexpected values
- Use workflow variables in condition expressions
- Test all branches to ensure proper routing
Need help? Have feedback?