How to capture the error reason of workflow and send it via Email

Hello All,

I am trying to figure out a way wherein I want to capture the failure reason for my workflows.
There are multiple workflows and a try catch cannot be used for each and every activity.
So I am looking for help where I can get the error reason and send mail notification.
Anyone can give me some pointers?

@rinki

Put your workflow in Try Catch block. If any error occurs in Try block then it will come to Catch block and here you print it using Error.Message

And also write the same thing in Body of the mail like Error.Message.

1 Like