Node: Try / Catch (Handle Errors)
How to use the Try / Catch node to catch errors from the previous step and branch into two different paths.
The Try / Catch node checks the result of the node that ran right before it and decides which of its two outputs to follow: success if everything went fine, or error if the previous step failed. It's how a workflow avoids grinding to a halt over a one-off problem — say, an HTTP Request node that doesn't respond.
When to use it
- Right after an HTTP Request node that calls an external system that could fail or be down.
- After actions that depend on data that might be missing (e.g. an
Update Dealnode with no deal attached). - Anywhere you want to alert a human when something goes wrong instead of leaving the workflow stuck.
Configuration
This node has no fields of its own to fill in. You just wire up:
- The success output to the normal path.
- The error output to your error-handling path (e.g. a
Start Team DMalerting about the failure).
If Try / Catch is placed as the very first node in the workflow (nothing runs before it), it defaults to the success path.
Example
A workflow calls an HTTP Request to check a product's stock in an external system. Right after it sits a Try / Catch: if the request fails, the "error" output fires a Start Team DM warning the tech team; if it succeeds, the "success" output continues with the normal customer-facing flow.
Tips
- On the error branch, the variables
{{$error.message}}and{{$error.node}}become available for use in your alert message. - Place Try / Catch immediately after the node that might fail — it always evaluates the result of the node right before it, not any earlier node.
Troubleshooting
If the "error" branch never fires even though the previous node should be failing, confirm that node actually returns a handled error (not an uncaught exception) and that there's no other node sitting between the two.
Related articles
-
Build your first workflow
Omnifox workflows automate your operation: a trigger starts the automation and action nodes do the work. Build a welcome message in minutes.
-
Workflow triggers catalog
Learn which events can start a workflow automatically in Omnifox.
-
Action nodes available in workflows
Discover the actions a workflow can run automatically.
-
Conditions and branching (if/then) in a workflow
Make your flows take decisions and follow different paths based on each contact data.
-
Ready-to-use workflow templates
Start your automations in minutes from prebuilt flows you can customize.