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.
Solved! Go to Solution.
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 🙂
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 noreply@companyname.com) and then subject of the email.
Hope that helps.