You are viewing limited content. For full access, please sign in.

Question

Question

Bad email fail workflow

asked on April 22, 2020

Hi all!

I have a list of 1000 emails and I need to send them a PDF. I'm using a loop for that.

In my list, some emails are bad (e.g : user@domaincom [no point]) and because of that, my workflow have some errors and it's normal but idk why, the next email is not treated.

 

Let's me explain, this is my list

id | email

1  | test1@test.com (correct)

2  | test2@testcom (not correct)

3  | test3@test.com (correct)

 

The email number 2 is not correct and the email will not sent. But because of that, the 3rd will fail too.

 

At the end, my workflow only treated maybe 950 emails but I have only 25 bad emails.

 

How can I do to check if the email is correct before to send it?

Thanks in advance.

Regards

0 0

Replies

replied on April 23, 2020

Hi Olivier,

If you place your email activity inside of a Try-Catch this will handle an incorrect email.

This will run the Email activity and, if any errors occur, go into the Catch Branch where you can set up additional activities like emailing you a notification or something similar. It will then continue the workflow without terminating and, in my example, move on to the next row.

1 0
replied on April 23, 2020

This is expected behavior. An incorrect email address is not a recoverable error, so Workflow terminates.

You could run Pattern Matching to validate that your email address is in a valid format.

You could also move the emailing part to its own workflow that gets invoked in the For Each loop. If the invoked workflow terminates with an error, the main one wouldn't be affected.  That way you also take advantage of Workflow's multi-threaded architecture for faster processing. In this case, I would still validate that the email is sane before sending it out.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.