switch node provides multi-way branching. It evaluates an expression and matches against cases using exact values, numeric ranges, or regex patterns.
Configuration
Config Fields
Case Object
Each case can use one of three match types:Match Types
Exact Match
Match against a specific value:Range Match
Match numeric values within a range:Pattern Match
Match using regular expressions:Output
Examples
Route by HTTP Status
Categorize by Score
Route by URL Pattern
Boolean Switch
Evaluation Order
- Cases are evaluated in order
- Pattern match is checked first (if
patternis set) - Range match is checked next (if
minormaxis set) - Exact match is checked last (if
valueis set) - First matching case wins
- If no case matches,
defaultbranch executes
Type Coercion
The switch node performs smart type coercion:- String
"true"/"false"are converted to booleans - Numeric strings are parsed as numbers for range comparisons
- Array values allow matching against any element
Related
- Condition Node - Simple if/else branching
- Template Expressions - Expression syntax