Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Sending multiple emails based on multiple conditions

Highlighted
8 - Asteroid

Problem statement:

I don't know how to create a workflow with two distinct email tools that will conditionally send one email and NOT send the other.

 

Why?

The only proposed solution that I've seen Alteryx propose for NOT sending an email conditionally is to throw an error with the message tool and stop processing records through the tool. However, the email tool is configured such that if there are ANY errors in the workflow, the email doesn't send. So, this fix doesn't work if you have multiple email tools in a workflow.

 

So, how can you solve for this problem?

 

I have two distinct email tools in my workflow (email A and email B). I ALWAYS need email A to send, I only need email B to send if a certain condition (e.g. record count). Because I ALWAYS need email A to send, I can't conditionally throw an error to prevent B from sending.

Highlighted
Alteryx Certified Partner

Hi @dmccandless if you take the email address for the second email tool from a field in the data, then you can put a filter tool before the email tool. If your condition fails, then no email address will be sent through the email tool and so no email will be sent

Highlighted
Alteryx Certified Partner

@dmccandless here's a very brief outline of a workflow that does what you're after

 

OllieClarke_0-1583846497667.png

 

Highlighted
8 - Asteroid

Hello @dmccandless 

 

Similar to @OllieClarke solution but just allows you to alter the format and email itself more.

 

alyssa_sedai_0-1583874672158.png

 

1) Counts the records.  If the workflow has no records (aka it is true) it goes up otherwise it goes down.

alyssa_sedai_1-1583874698564.png

 

The True and False do the same thing the wording is just different.

 

2) Create Report Header

alyssa_sedai_3-1583874771823.png

 

alyssa_sedai_2-1583874763359.png

 

3) Create text for the email

alyssa_sedai_4-1583874803680.png

 

alyssa_sedai_5-1583874816789.png

 

4) Create the layout of the email (it won't say missing if you actually run it)

alyssa_sedai_6-1583874909631.png

alyssa_sedai_7-1583874934889.png

 

5) Generate the email itself

alyssa_sedai_8-1583874964234.png

Here you can set who you want to receive the email, where the email came from (I do noreply@companyname.com) and then subject of the email.

 

Hope that helps.

 

Labels