Multi-Condition Node
The Switch node routes workflow execution to one of multiple paths based on matching conditions. Use it when you have more than two possible routes, such as categorizing items, routing to departments, or handling multiple statuses.When to Use
- Multiple categories - Route based on type, category, or classification
- Status handling - Different actions for different statuses
- Department routing - Send to Sales, Support, Billing, etc.
- Multi-language - Route based on detected language
- Tiered responses - Different handling for different levels
Example: Email Routing
Route support emails to different teams:Configure the Switch
Add a Switch node:
- Mode: value
- Variable:
{{llm_1.response}} - Cases:
- BILLING
- TECHNICAL
- SALES
- GENERAL
- Default: enabled
Example: Order Status Handler
Different actions based on order status:Example: Language-Based Routing
Route to native speakers:Switch Modes
Value Mode
Compare a single variable against multiple values: Configuration:{{llm_1.response.priority}} == "P1", etc.
Conditions Mode
Each case has its own independent condition: Configuration:In conditions mode, cases are evaluated in order. The first matching condition wins. Use a
true condition last as a catch-all.Default Case
The default case handles values that don’t match any defined case:Case Naming
Give cases descriptive names that appear on the workflow canvas:Combining with Merge
If branches need to rejoin:Dynamic Case Values
Reference variables in case values:Tips
Condition vs. Switch
| Scenario | Use |
|---|---|
| Yes/no decision | Condition |
| 2 options | Condition |
| 3+ options | Switch |
| Comparing one variable to multiple values | Switch (value mode) |
| Multiple independent conditions | Switch (conditions mode) |
Settings
Display name shown on the canvas.
Unique identifier for referencing outputs.
How to evaluate cases:
- value - Compare a variable against specific values
- conditions - Each case has its own condition expression
For value mode: the variable to compare (e.g.,
{{llm_1.response.category}}).Array of cases, each with:
name- Label for this casevalue- Value to match (value mode)condition- Expression to evaluate (conditions mode)
Whether to include a default case for unmatched values.
Outputs
The Switch node has multiple output handles:- One handle per case - Named after the case (e.g., “Sales”, “Support”)
- default - Executes when no cases match (if enabled)
The name of the case that matched.
The value that triggered the match.
