Salesforce Flow Automation: Standardized Fault Path Error Messaging
Salesforce Flow includes a powerful feature called fault paths, but it’s rare to see it implemented in any organization. The fault path allows you to send a message or initiate an action when a Salesforce Flow encounters an error on a pink DML node (Create, Update, Delete). However, taking full advantage of this feature requires configuring an error response for each individual node in your Flows, which can be time-consuming and tedious. As a result, many users skip this step.
If you’re not subscribed to APEX exception emails, you’ll miss out on notifications about Flow errors entirely. Even if you do receive these emails, it can be challenging to decipher what went wrong.
To simplify this process, I will show you how to set up a subflow that triggers whenever any node encounters an error, automatically sending you a standardized fault email. This approach will save you a significant amount of time and hassle.
Let’s get started.
- Create a new Auto Launched Flow in Salesforce.
- Create a Variable resource
- API Name = FlowCurrentRecord
- Data Type = Text
- Check the Available for Input box
- Create another Variable resource
- API Name = FlowFaultMessage
- Data Type = Text
- Check the Available for Input box
- Create a Text Template resource
- API Name = EmailBody
- Body =
- There is a fault in a flow affecting this record: {!FlowCurrentRecord}.
- Message: {!FlowFaultMessage}
- Please address
- Add an action node to the Flow
- Choose the Email category and the “Send Email” action. Label it how you wish
- Under the Body input action, add the {!EmailBody} text template resource you created earlier.
- Under the Recipient Address List input action, put in a comma-separated list of email addresses of your recipients.
- Under the Sender Type input action, type in “DefaultWorkflowUser”
- Under the Subject input action, type in “There’s a Flow error in the [company name] org”
- Save the Flow, label it “ALF: Fault Line Error Email”, and Activate it.
In any subsequent Flow you create, on any pink DML node for Create or Update actions, complete the following actions:
- Add a fault path
- Add a Subflow action and select the Auto Launched Flow you just created
- Label it “Send Fault Email”
- Type in {!$Flow.CurrentRecord} in the FlowCurrentRecord input value
- Type in {!$Flow.FaultMessage} in the FlowFaultMessage input value
- Save and Activate.
You now have a custom fault email set up to notify you whenever a create or update node in a Flow encounters an error. This email will specify which Flow experienced the error and provide the error message. Most importantly, it will be much easier to understand than an APEX Exception Email.
**Special bonus** Add additional input variables to the EmailBody to include the location of the node that errored out. You get more specific error messaging than Salesforce deems worthy to grace its certified Admins with.
You’re Welcome.
Zach is a Revenue Operations Expert with over 7 years of experience in Operations and early-stage, venture-backed, high-tech B2B SaaS. He has a strong background in Sales and Systems gained through his time in healthcare technology and telecom. He holds a bachelor’s Degree in Business Administration and is a 3x certified Salesforce professional. Zach is passionate about startup business growth and enjoys helping readers by providing insights on gaining higher efficiency and greater effectiveness within revenue and operations teams.