Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Conditional Email

SkyD
7 - Meteor

Hello All,

I am trying to send an email when count > 0 titled "Please investigate" , and an alternative email when count = 0, titled " All good" .  However I am running into a problem, the email does not send when count = 0.

I have tried a few different ways to no avail.
Screenshot 2023-11-17 150135.png



I have tried to look through the various conditional email community posts yet have not found anything that has worked.

13 REPLIES 13
rzdodson
12 - Quasar

@SkyD no, not #teamvertical!

Jokes aside, I think what may be occurring is that there are not any records flowing out of your Filter tool where where you have a row count of 0. In short, the Email tool requires at least one record before it can send an email out. My recommendation here would be to add your email elements to the data table through a Union or Append tool prior to sending that email so that there is something there. From there, you can customize the text of your email to be specific to the message you want the end to receive.

Alternatively, you can have the workflow intentionally error out, and then use the workflow's configuration settings (Workflow - Configuration > Email Alert > Send Email) to customize the message the user receives.

Hope this helps you navigate which approach to take. :)

SkyD
7 - Meteor

Haha #Teamvertical it's more pleasing to my eye and its easier to scroll up/down rather than across.  

Right, which there in lies my dilemma.  I can try the union and or the append, and get back to you. The flow has multiple conditional emails that need to be sent, this was just for one factor, so I don't think your second option would work.  Thank you

rzdodson
12 - Quasar

@Sky you may be right on the second option depending on how the rest of the workflow is set up. Since it sounds like there may be >2 email routes, I would recommend going with option 1.

If you are able to post the actual yxzp file (Alteryx packaged workflow) I can also take a look for you.

SkyD
7 - Meteor

@rzdodson unfortunately the union and the append both send the all good email along with the error email, when there is an error. The union sends an email for the total number of rows that fit the criteria of notional < 0

rzdodson
12 - Quasar

@SkyD if it doesn't contain proprietary or sensitive information, would you mind posting the workflow you have? I'll attempt to see if I can get it to work.

SkyD
7 - Meteor

Hello, I had to delete some info, but here is one of the sections from my flow. Thank you in advance!

harshendra
8 - Asteroid

@SkyD just to be clear on the issue, you are looking for two mails each time the workflow runs but you are getting only one?

SkyD
7 - Meteor

Hello! No I am looking to send only one at a time, either or.  When there is material that is flagged and needs manual intervention I need to send the Issue email. When no data meets the filtered criteria I would like the flow to send the "all good" Standard email.  Currently if there is an issue both emails will be sent, which looks sloppy.

Side Bar:
How do I @ people? I am only getting the subject "conditional email" when I try it. Is it just by replying to your comment?  

harshendra
8 - Asteroid
 

@SkyD See attached. When there is any issue ([Send Email Flag] = "True"), Issue Email will be triggered. If there are no issue flagged ([Send Email Flag] is not "True"), Standard Email will be triggered. Please ignore the tool warnings as I did not configure it.

Screenshot 2023-11-22 122654.png

Labels