community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Knowledge Base

Definitive answers from Designer experts.
New Data Science Blog

Check out the latest post: All Models Are Wrong

READ MORE

Tool Mastery | Email

Community Content Engineer
Community Content Engineer

Email.pngThis article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Email Tool on our way to mastering the Alteryx Designer:

 

Here at Alteryx we believe in working smart, not hard. Building out reports to highlight business-critical metrics is a pretty smart way to track goals. Customizing those reports to everyone in the department, then distributing them as attachments to individual emails? That sounds like a lot of hard work. Scheduling those reports from a refreshing data source each month so you don’t have to remake or rerun the reports yourself - that’s genius. Logging into your work computer to open up Alteryx, then having to check the scheduled results before having any peace of mind those reports were delivered without a hitch? Hard.


The good news is that, thanks to the Email Tool, we can do the hard parts of our process above in the smartest possible way: email automation. Which, as long as you subscribe to the litmus test of automated email, can dramatically decrease the amount of work it requires to distribute your emails in the use cases below.

 

1.png

The automated email litmus test: upon receipt, will my audience be Ron Burgundy?

 

  • Sending emails after workflow completion/notifying workflow owners when a scheduled run completes (bonus: notification for errors on run)

To send an email when a workflow completes, simply incorporate an Email Tool somewhere in your workflow:

 

2.png;

 

In the attached v10.6 workflow, Email Tool.yxmd, you can see this being done in the “Notification email to reporting process owner” Tool Container. Each time this workflow runs (including when scheduled), a static email notification will be sent to the workflow owner.

 

If you’d like to know the status of the workflow and if there were any errors/warnings, try configuring a workflow event the same way you would the Email Tool:

 

4.png                           5.png

 

  • Automatically distributing customized reports to their individual audiences (see attached Email Tool.yxmd)

 

6.png

 

  • Emailing customers or members of a distribution list (see attached Email Tool.yxmd)

 

7.png

 

Please note that any useable email addresses have been redacted from the attached, causing errors upon run.


If you’re having trouble with the Email Tool or receiving obvious SMTP related errors, check out our article on how to troubleshoot the Email Tool and SMTP! If your attachments generated in the same workflow are giving you difficulty, try using the Prepare Attachment Macro to write them to temp space first. Using web-based email providers like Gmail or Hotmail to send an email in Alteryx is also possible, but with another approach detailed here.


By now, you should have expert-level proficiency with the Email Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

 

Stay tuned with our latest posts every Tool Tuesday by following @alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.

Comments
Meteor

Whats the best way to get around not showing up in a spam folder and limiting how many emails you can send every minute?

Community Content Engineer
Community Content Engineer

Hey @mattamidus!

 

The spam folder settings are likely custom to your inbox, I would ask your IT department... It also will have to do with the "from" address you use in the Email Tool. To limit the emails, try the Throttle Tool!

 

Best of luck!

MattD

Meteor

I'm not sure that will work with the email tool.  In the email tool's description it say it has to be the last tool to execute in a work flow.  I had a similar work flow created  using the wait a second tool and splitting the emails into groups with different time periods to wait.  At the the end of the work flow they all executed at the same time.  It seems as though the throttle tool is doing the same thing.  Any other ideas?

Community Content Engineer
Community Content Engineer

@mattamidus Shoot... You may have to try embedding the email tool in a batch macro that has its input throttled. If that doesn't work, you can also try sending the emails via the command line and using statements to pause between messages

Meteor

Oh wow, are there tutorials anywhere to go about doing that?

Asteroid

@MattD,

 

Thanks for the write-up as always. We have a process we are working on that will send emails that may have 0 attachments and may have 5 attachments. Our issue is, if we add 5 attachments based on the fields and one is blank, then it errors out the email tool. Only thing I can think is to count the number of Attachments and have separate branches based on the number of them or attaching extra blank attachments. Neither is terribly elegant. Any thoughts or hidden functionality I missed with this? 

 

Thanks,

Meteor

@MattD  I found a "solution"  So what I did was make a work flow that counts all the emails and then splits them up into groups that are the maximum allowed to be sent at once for my server.  Which in this case is 30 every minute.  Each groups name is labeled based on the time of the day down to the minute.  Depending on the time of of day it only lets the work flow run with the corresponding name related to that time.  I then have the work flow set to run every minute.  Maybe not the best solution but it works.  If anyone has a better solution let me know. Smiley Happy

Atom

Hi @MattD,

Like FFFool, I have a dynamic list of reports to attach to an email.  A recipient may have one or several reports. At this point I know the maximum is 5 but I don't know that this will always be the case. I don't want to send the recipient 5 different emails. Is there any way to create a list of files to attach and use that? I've tried separating with comma and with semicolon to no avail. 

 

Alternatively, how can I embed a page break between reports?  If Sales Rep Susie gets a report for widgets and one for gizmos and I'm exporting to a PDF, can a force a page break between the widgets and the gizmos?

 

Thanks!

Asteroid

Hey @njn

 

You should be able to achieve this by creating separate tables in separate streams, then joining the two streams together on Sales Rep's ID. Then use the Layout tool to create your report that contains both gizmos and widgets, and in the Orientation Drop-down select "Vertical with Section breaks'. I was going to attach a workflow that used sample data, but I can't seem to find how to do it in the comments section. Instead see the Orientation section of this LINK.

 

Hope that helps.

Meteor

 Hey @MattD,

 

I am using email tool to distribute emails to external recipients and not always the emails are correct and I am wondering if there is a way to get the list of bounced emails for a specific workflow. The email tool says message sent for any (correct or incorrect) given email and I would like to know if Alteryx captures those errors/email bounces or should I trace it with SMTP?

 

Thank you!!

Asteroid

Hey there @MattD !

 

When an email is sent using this tool, is there a way to have it reflected in the Sent Folder of Outlook?

 

Meaning I can check into the Sent Folder of Outlook to see that the email was sent.

 

Thank you for your help!

Great way to understand the email tool. I am able to create a workflow that is generating CSV and then emailing it to users while executing on my local machine. I don't understand how to 'save the CSV to a location on Alteryx gallery' and then 'attach it to the email as an attachment'. Can you shed some light on that? The idea is to then schedule the workflow in Alteryx so it can run and send files to users.

ThankUntitled.png

Asteroid

@mc_wallendjack - I don't think you will be able to get it to show in the Outlook outbox since the message is not going out through outlook. It's generated and sent directly through Alteryx - not Outlook.

 

I could be wrong on that though - any other input on this?

Asteroid

For nimeshkhatri workflow with the "Block until Done" tool, the "Render" and "Email" tools should be connected to "1" and not on separate outputs, use outputs 2 and 3 for group the tools you want to run in group and the order you connect to "1" to dictates the finishing order.

Atom

Trying to do something similar with email tool and my workflow will always have errors after the first run because it includes code to dynamically create folder names based on the current date. If you ever need to run a script multiple times in a month that folder create script will always error out. Is there a way to tell the email tool that these errors can be ignored or do i need to move these parts of the workflow off into another script that i only run once?

 

i guess i can put it in a container and disable that container when not using.

Meteor

Hey @mompermj - I believe that the "folder create" script is generating error if there exists a folder already. The Run Command tool will execute for each row and if there are multiple rows for same date, it tries to create the same folder and generates error, to avoid this you can use the summarize tool to group by date, so that only one row exists for each date and then supply it to the Run Command tool. Additionally, you can use the Directory tool to get the existing folder information and join with the incoming data to filter out existing folders

 

Hope this helps!