Workflow Switch
Compares one value to another and selects the next chain link based on deterministic branch rules.
Run tool
Form input
Direct JSON or Markdown
Submit JSON directly or Markdown that can be converted into JSON.
Work steps
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
left | any | No | Resolved value to compare |
operator | text | No | Comparison operator |
right | any | No | Comparison value |
value | any | No | Value used with cases array |
cases | array | No | Array of branch cases with operator, compare_to, and next |
default_next | text | No | Fallback next step id |
Outputs
| Name | Type | Description |
|---|---|---|
matched | boolean | Matched |
selected_next | text | Selected next |
work | array | Work |
Sample request
{
"left": 5,
"operator": "greater_than",
"right": 3,
"cases": [
{
"operator": "greater_than",
"compare_to": 3,
"next": "go_high"
}
],
"default_next": "go_low"
}