Router
The Router node sends the workflow down one or more routes, where each route has its own condition.
Screenshot placeholder
The palette describes it as "Multi-way routing".
When to use it
Use it when there are several possible paths and each one has its own rule. For example, send "billing" questions one way and "technical" questions another. If you are only comparing one value against fixed options, a Switch may be simpler.
Settings
| Field | What it does | Notes |
|---|---|---|
| Routing mode | How routes are chosen | First match (stop at first true) (default), All matches (parallel) or Random route |
| Routes | The list of routes | A new node starts with two routes, Route A and Route B |
Each route in the list has:
| Field | What it does | Notes |
|---|---|---|
| Route label | The name shown on the node and on its output | Placeholder "Route label" |
| Condition | The expression that decides whether this route is taken | Placeholder {{ output.intent }} == "billing" |
Click Add route to add one. The trash icon on a route removes it. New routes are named "Route 1", "Route 2" and so on, based on how many exist.
Inputs and outputs
| Handle | Where | Purpose |
|---|---|---|
| Input | Top | The step that comes before |
| One output per route | Right side, evenly spaced | The path for that route. Hover an output to see the route label |
The node header shows the current routing mode.
Example
This is an illustrative example. You are sorting incoming messages.
- Set Routing mode to First match (stop at first true).
- Add a route labelled "Billing" with the condition
{{ output.intent }} == "billing". - Add a route labelled "Support" with the condition
{{ output.intent }} == "support". - Connect each output to the steps that handle that kind of message.
Tips
- With First match, order matters. Routes are checked in the order listed, so put the most specific rule first.
- All matches (parallel) can follow more than one route at once.
- The node data holds a default route setting, but the settings panel does not show it. The documented behaviour here covers only what the panel offers.