Try Catch and mail alert

Hi everyone,

I want robot to catch any type of error and send an alert Email.

Can you provide me with a workflow sample?


1 Like

You’ll need to fill out the rest of the details for sending the email based on your mail credentials, but here you go. (837,8 Ko)


Just select the exception type as System.Exception from the drop down list. And pass the exception method into Assign activity then pass the Assign activity variable into mail body.

Thanks a lot !

However, when the error occurs, it does show which activity did not work.

Simple workflow:

  • Open google
  • Click on a button which does not belong to

Based on your workflow, the studio states that the button could not be found without sending mail.

How to fix it?

ReFrame work has all kind of exception handling! and you can just add send email.

1 Like

The SMTP activity will not send mail unless you fill out the rest of the activity fields. These are things I cannot determine, since they require your credentials. Also, if you’re running the process in Debug mode, it will still stop at the error and will require you to press the Continue button to get to the Email activity. Ctrl + F5 will execute the workflow and will only stop at errors which are not handled by the workflow.

That said, I agree with Divyashreem that the ideal way to handle your exceptions is through the REFramework, and not in the Try Catch example I’ve provided.

1 Like

Thanks a LOT BUDDY!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.