Error management

I have created a scenario that ends with the Gmail module to send emails from a list. The problem is that I don’t have any error management; if, for example, an email is sent to an account that, for instance, doesn’t have “.com”, the scenario stops and does not continue. I need some kind of try and except.

Error example

what is most recommended?

If email doesn’t have .com that means the email is invalidated. And if email is invalidated then scenario is going to break for sure.

You have to use module for email validation.

2 Likes

Handle errors so scenarios don’t stop.

You might want to add some error handling to your modules to handle exceptions, so the failing module(s) can automatically be retried or ignored. By handling any errors by adding a “Error handler” to the module, the scenario won’t throw an error and get turned off.

Error directives can only be added to an error handler route.

1. Right click and select “Add error handler”

Screenshot_2024-04-13_220413

2. Error handlers will appear

For more information on error handling, see:

2 Likes

Filter out invalid emails

Alternatively, you can also add a filter just before your Gmail module to have a basic “Match Pattern” to filter out emails, using the RFC 5322 compliant regex pattern from regex - How can I validate an email address using a regular expression? - Stack Overflow

This can be used in conjunction with the error handling above for a more robust solution.

3 Likes

Hi @samliew , I´ve implemented both, error handling and the filter. Thanks also for the Informational links.

SALUD…Charly

4 Likes