Alteryx Designer

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

Sending multiple emails based on multiple conditions

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.



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.

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

Alteryx Certified Partner

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




8 - Asteroid

Hello @dmccandless 


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




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



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


2) Create Report Header





3) Create text for the email





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




5) Generate the email itself


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


Hope that helps.