Advanced flow control: try/catch, parallel, and merge

How to handle errors with Try / Catch, open several branches with Run in parallel, and join them back with Merge branches in your workflows.

Jun 26, 2026

Watch this step in the video · Flow control

What it is and when to use it

When a workflow does several things at once or calls external services, you need to control the order and what happens if something fails. Omnifox has three advanced nodes for this, all under the Actions section of the workflow editor palette:

  • Try / Catch (handle errors) — detects whether the previous node failed and routes through a different output.
  • Run in parallel — opens several branches from one point.
  • Merge branches — brings those branches back together at a single point before continuing.

They're ideal for API calls (HTTP request), emails, or messages that can fail, and for firing several actions that don't depend on each other.

Try / Catch (handle errors)

This node reads the result of the immediately previous node and routes based on whether it succeeded or failed. That's why you must place it right after the node you want to watch (for example an HTTP request, an email, or a message).

It has two outputs:

  • success (green) — the previous node finished OK.
  • error (red) — the previous node returned an error or threw an exception.

On the error branch you have two variables to report what happened:

  • {{$error.message}} — the error text.
  • {{$error.node}} — the ID of the node that failed.

A typical use: after an HTTP request to your CRM, add a Try / Catch; on success you continue the normal flow, and on error you notify an agent with the error message.

Run in parallel

Opens between 1 and 5 branches ("Number of branches" field). Each branch has its own output handle: b1, b2, … bN. Connect each handle to the start of its branch.

In this version the branches run sequentially in numeric order (b1, then b2, …), even though the canvas looks parallel. The end result is the same: every branch runs.

Lowering the branch counter does not delete existing edges: if you wired b3, b4, b5 and drop back to 2, those edges survive.

Merge branches

This is a synchronization (join) point. It counts the edges entering this node and only lets the flow continue once all of them have arrived. Connect the output of each parallel branch to this same node.

  • If a single edge arrives, the merge acts as a pass-through.
  • If a branch never arrives, the merge stays blocked indefinitely.

Steps to build a fan-out with a close

  1. Open the workflow editor from Automations.
  2. Drag a Run in parallel node and set the number of branches.
  3. Connect each handle (b1, b2, …) to the first action of its branch.
  4. Build each branch with the actions you need.
  5. Drag a Merge branches node and connect the final output of each branch to it.
  6. Continue the flow from the merge output.

Verification

Use the editor's Test run button and check the execution timeline: you should see each branch run and the merge advance only once, at the end.

If it doesn't work

  • The workflow hangs at the merge: a branch never arrived. Make sure every branch ends connected to the merge, or cap it with a wait node (Wait until event) so the branch doesn't stay pending forever.
  • Try / Catch always returns success: you placed it far from the node to watch. It must go immediately after it.
  • {{$error.message}} comes out empty: you're using it outside the error branch; those variables only exist after a real error.

Tips

  • Combine Try / Catch + Merge for retries: on the error branch increment a counter with the variables node and try again.
  • Keep branches independent; if one branch depends on another's result, don't use parallel, chain them instead.

Related articles

Was this helpful?

Related articles

Message us on WhatsApp