Docs
Sign in

Router

The Router node sends the workflow down one or more routes, where each route has its own condition.

Screenshot to add: A Router node listing its numbered routes, with one output on the right for each route, and its settings panel.

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

FieldWhat it doesNotes
Routing modeHow routes are chosenFirst match (stop at first true) (default), All matches (parallel) or Random route
RoutesThe list of routesA new node starts with two routes, Route A and Route B

Each route in the list has:

FieldWhat it doesNotes
Route labelThe name shown on the node and on its outputPlaceholder "Route label"
ConditionThe expression that decides whether this route is takenPlaceholder {{ 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

HandleWherePurpose
InputTopThe step that comes before
One output per routeRight side, evenly spacedThe 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.

  1. Set Routing mode to First match (stop at first true).
  2. Add a route labelled "Billing" with the condition {{ output.intent }} == "billing".
  3. Add a route labelled "Support" with the condition {{ output.intent }} == "support".
  4. 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.