/ /

Route & Merge control node

The Route & Merge node splits a workflow into conditional branches and then converges them back into a single path. You define a condition for each branch, run branch-specific actions in parallel, and then continue the workflow on a shared path. Because the branches reconverge, any steps that must run after the routing are configured once on the downstream path instead of being duplicated inside every branch.

┌─ Trigger ─────────────────────────────────────┐
│                                               │
│         Route & Merge node (block)            │
│                                               │
│  ├─ Branch A ──→ [Actions] (condition true)   │
│  ├─ Branch B ──→ [Actions] (condition true)   │
│  ├─ Branch C ──→ [Actions] (condition true)   │
│  └─ Default  ──→ [Actions] (no condition met) │
│                                               │
└───────────────────────────────────────────────┘
                      │
              [Continue workflow]

Use the Route & Merge node when a workflow needs to take different actions based on conditions and then continue on a common path. Typical cases include running several approver branches in parallel and proceeding with whoever responds first, calling two APIs concurrently and combining both results before continuing, and providing a timeout-based fallback when a branch depends on an external system or a human action that may not complete in time.

Add the node

  1. Open a workflow on the canvas and select the Controls palette.

  2. Add the "Route & Merge" node. Branches diverge from the top of the node and reconverge at the bottom of the block, after which the workflow continues on a single path.

  3. Select the "+" button below the node to add branches. Each branch has its own output port where you build that branch's actions.

Branch conditions

Each branch has a condition that determines whether it runs. Conditions are built from fields on earlier steps, such as Ticket.severity or Issue.status, and combined with AND or OR logic. When a branch condition evaluates to true, the branch runs; when it evaluates to false, the branch is skipped.

All fields and outputs from steps before the Route & Merge node are available inside every branch, so branch conditions and actions can reference earlier data.

Default branch

Every Route & Merge node includes a Default branch that runs only when none of the other branch conditions are met. The Default branch acts as a fallback for edge cases and unclassified scenarios, ensuring the workflow always has a defined path.

Branch selection and completion

Two settings control how many branches run and when the workflow continues.

Run all matching branches

When enabled, every branch whose condition is true runs in parallel. When disabled, only the first branch whose condition matches runs, and the remaining branches are skipped. This setting is enabled by default.

Wait for all branches to finish

When enabled, the workflow waits for every running branch to complete before it continues. When disabled, the workflow continues as soon as the first branch finishes, and the remaining branches are cancelled. This setting is enabled by default.

📝 Note: When Run all matching branches is disabled, only one branch runs, so Wait for all branches to finish has no effect.

Completion behavior

Wait for all branches

All matching branches run in parallel, and the workflow waits for every one to finish. Each branch's output is available to downstream steps, so results from multiple paths can be combined.

Branch A: HTTP GET /accounts  → account_data
Branch B: HTTP GET /contacts  → contacts_data

Downstream steps can use both account_data and contacts_data.

Use this behavior when you need results from every parallel path before the workflow proceeds.

First branch to finish

All matching branches start in parallel, and the workflow continues as soon as the first branch completes. The remaining branches are cancelled, and the branch that completed first is identified for downstream steps.

Branch A: responds in 2s → workflow continues with Branch A
Branch B: responds in 5s → cancelled
Branch C: responds in 8s → cancelled

Use this behavior for race patterns, where multiple paths produce the same kind of result and you want the fastest one.

📝 Note: In first-branch-to-finish behavior, actions inside a branch can reference only steps that ran before the split. Outputs from sibling branches are not available, because the workflow cannot know in advance which branch wins.

Shared variables

Variables declared on the Route & Merge node are readable inside every branch and in downstream steps after the block completes. Inside a branch, use a Set Variable step to write a value. Unlike an If/Else node, values set inside a branch remain visible to downstream steps once the branches reconverge.

When the workflow waits for all branches, variable values follow these rules:

  1. When two branches write to different variables, both values are preserved in the output.

  2. When a branch does not set a variable, it does not overwrite a value set by another branch.

  3. When two branches write a non-empty value to the same variable, the last branch to complete wins. This order depends on runtime timing and is not guaranteed.

Give each branch its own dedicated output variable to avoid write conflicts.

Timeout duration

Set how long the node waits, in days, hours, or minutes, up to a maximum of five days. When the timeout is reached, the workflow continues without waiting for the remaining branches. Configure a timeout as a safety net for branches that depend on external systems or human actions that may not complete in a predictable timeframe.

Error and timeout handling

When the workflow waits for all branches:

  1. When some branches error but others succeed, the node completes with the available data and error flags for the failed branches, and the workflow does not fail.

  2. When every branch errors, the node returns an error status.

  3. When the timeout fires before completion, the workflow continues with the available data and error flags for the branches that did not finish.

Convert between Router and Route & Merge

A Router node and a Route & Merge node are the same node type in two modes, so you can convert one into the other on the canvas. From the node's ellipsis menu, select Transform to Merge on a Router or Transform to Router on a Merge. The conversion preserves your existing branch conditions, so you do not need to rebuild them.

⚠️ Warning: A workflow must be in draft status to convert a node between Router and Route & Merge.

Best practices

Follow these practices when you build a Route & Merge node:

  1. Use descriptive branch names that clearly indicate each path's purpose.

  2. Give each branch its own output variable to avoid write conflicts.

  3. Define the Default branch as a fallback for unmatched conditions.

  4. Configure a timeout when branches depend on external systems or human input.

  5. Test with sample data to confirm that conditions activate or skip branches as expected.

Avoid these patterns:

  1. Duplicate branch names on a single node, which the workflow blocks and which can otherwise cause the workflow to hang.

  2. Multiple branches writing to the same variable when the workflow waits for all branches, because the last branch to finish wins and the order is not guaranteed.

  3. Omitting a timeout when a branch waits on a human action, because the workflow may wait up to the five-day maximum.

  4. Branches with empty names or descriptions.

Node comparison

Different control nodes suit different branching needs:

Route & Merge

Splits a workflow into parallel paths and reconverges them on a shared downstream path. Configure it to wait for all branches when you need combined results, or to continue with the first branch to finish for a race pattern. Disable Run all matching branches when the categories are mutually exclusive and only one path should run.

Router

Splits a workflow into multiple paths that each run independently, with no reconvergence.

If/Else

Handles a simple binary decision between one path or the other.

Was this article helpful?