Try flow logic
Allow a flow to continue running when an error occurs within a flow logic block. Run a sequence of actions in response to errors within the flow logic block.
Inputs
Try flow logic does not have field inputs. Instead, it displays a plus (
Add Action, Flow Logic, or Subflow after Icon\) icon that enables you to add a sequence of actions, flow logic, or subflows to attempt to run and evaluate for errors. You can add multiple items to a Try block. When an error occurs, the flow runs the sequence of actions, flow logic, or subflows within the error section of the flow logic block.
Outputs
This flow logic has no outputs, but the actions, flow logic, and subflows within the Try block may have outputs. When an error occurs within the Try flow logic block, the failing action returns an action status of Completed (error caught). You can use this action status to determine which item failed and build conditional logic in the Catch block. For example, if a Create record action in the Try block has a status of Completed (Error caught), then run a Create record action in the Catch block that has different values.
Create a Problem record for critical priority incidents
In this example, the flow attempts to send one of three possible notifications when a critical priority network incident is created. The flow first tries to send an SMS message, and if that fails, it tries to send a Connect message. If the Connect message fails, it sends an email.
Example configuration of a Try flow logic block
Execution details
Sample execution details of a Try flow logic block
Flow and action error handling resources
For more information about using error handling in actions and flows, see the ServiceNow® Community post Flow and Action Error Handling Overview: Why and how to test for errors - Worfklow Automation CoE.
- Flow and Action Error Handling Level 1: Retry and Action Error Evaluation - Workflow Automation CoE
- Flow and Action Error Handling Level 2: Flow Logic - Workflow Automation CoE
- Flow and Action Error Handling Level 3: Flow Error Handling - Workflow Automation CoE
- Flow and Action Error Handling Level 4: Good Practices and Summary - Workflow Automation CoE
Parent Topic:Workflow Studio flow logic
Related topics
Append to Flow Variables flow logic
Assign subflow outputs flow logic
Do the following until flow logic