This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Configuring Gallery workflows to use temporary files for e-mail attachments or output
This article will help you configure Gallery workflows to use temporary files in the Engine’s staging directory for e-mail attachments or output.
Start by putting the file that will be used as an attachment or output in the same folder directory as the workflow. Then, in Designer, choose the file by browsing to its location on disk. Next, go to Options, Advanced Options, and Workflow Dependencies.
The best practice method is to change the output file data source path to a relative path. Select the option to Show Individual Tools, and then choose the Edit button next to the output file.
Click on the Relative button, and this will change the path of the file selected to be relative to the workflow. The path will appear like this:.\Output.yxdb.
Once the workflow is ready to publish to the Gallery, select File, Save As, and then the Gallery. The Save Workflow window appears, choose Workflow Options, and Manage Workflow Assets.
In the Save Workflow window, you have the option to either check or uncheck the file as a workflow dependency. When the file is unchecked, a new file writes to a staging directory each time the workflow runs on the Gallery. The staging directory used for the dynamic output gets removed automatically on a space needed basis.
When sending the output to recipients from the E-Mail Tool, the attachment should have a relative path to the workflow. Note that entering just the file name and extension implies a relative path to the workflow. This is recommended. Also, the use of a Block Until Done Tool will ensure that the output file writes entirely before sending the e-mail.
Similarly, when using an E-Mail Event, be sure the output file is configured with a relative path as well.
The Email tool is one of the critical last steps in putting that status report on cruise control. As of 2019.3, you can send those reports out through any SMTP server that requires credentials, with Gmail being one of the most popular. To ensure you can connect to your Gmail account, we want to provide you with a step-by-step guide to be successful.
Note: G-Suite, the paid version of Gmail, is not currently working with the Email tool.
Alteryx Designer Version 2019.3
Once you drop the Email tool onto the canvas you will be able to configure it. Let’s dissect that configuration below:
For Gmail, connect to smtp.gmail.com on port 465, if you're using SSL. Connect on port 587 if you're using TLS. Another example would be Yahoo - smtp.mail.yahoo.com
Encryption method (if required)
It is HIGHLY likely you will need to complete this step with SSL/TLS being the most widely used.
Username and Password
Username can include or not include the @domain part of email address
Configure the tool as usual by adding recipients of your analysis, a subject, etc. If you want more detail on configuring this tool please see this article.
You might need to go to your email account to configure some additional settings as security is an imperative for every company and your SMTP email provider likely has some guardrails against letting other applications send an email through their server. Gmail, for example, requires you to change your account settings but you can do this easily using this link, or go to myaccount.google.com/security and scroll down to the option: “Less secure app access”.
Turn on “Less secure app access” (see below screenshots). Go back to Alteryx and send a test email to ensure it works. Then, kick your feet up and put those reports on cruise control.
And of course, if you need additional help, please visit our help documentation, reach out to a customer support representative, or start a conversation with a peer through Community. I found the information about Gmail SMTP server at this Google support thread: https://support.google.com/a/answer/176600.
** Update **
With the release of 2019.3 the email tool now has the ability to accept email authentication which opens the doors for sending email through Gmail and other web-based email services. Check out this post on how to send email through Gmail using Alteryx.
There have been a couple instances lately where users have wanted to use the Email tool to send email notifications as part of their workflow but run into issues because their email service is web based like Gmail or Hotmail.
Unfortunately the current Alteryx Email tools don’t support email from an online provider.
However, there is still a way to send email from Alteryx with a web based email. It’ll require the use of the Event tab or the Run Command tool and the installation of a third party tool. In this example a tool called SendEmail is used (Alteryx does not recommend or endorse this tool, it happened to be free and worked).
From the Events tab or the Run Command tool enter in the command that executes the tool then in the arguments section add in the tags that are required for the particular email tool.
Run Command tool:
There is another option in this post in the Ideas section by
Alteryx defaults to using the US/English Standard when it comes to number formats. However, for reporting purposes, it is important to remember that not all countries report their numbers in the same fashion. This article shows a quick and easy way to use Raw PCXML to convert numbers in to the Continental European Standard before outputting a final report. Throughout the workflow building process, numbers will be represented in the US/English Standard of 1,000.00. However, when building an automated report, it is important to remember who the audience will be. In the case of users in countries that use the Continental European Standard, it may best to have Alteryx change the numerical formatting system before outputting the final report. The following example is specific for the Spanish-Spain numbering convention. Process
1. Pass the data through a Table tool to create a Table Report Snippet. 2. Insert a Report Text Tool and format as seen below. The LocaleID is what is specifically driving the formatting change. For more information on other locale ID's check out this article. 3. Complete your layout and use a Render tool to complete your automated report. Please see the attached workflow for an example in practice.
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.
You know that a huge part of conveying information to your audience is your visual presentation. Here's a way to increase the amount of information that can be shared with just a glance: Segment the data in a chart with color.
The Report Map Tool (master it here) allows to create thematic maps by selecting a "Theme" field on the Data tab and then further defining the theme on the Layers tab, for example:
The above example creates a map of Texas showing average annual rainfall totals where orange is the least rainfall and blue the most:
Pretty nice, right? But what if you want to change the map and instead of applying the theme to the fill color for the polygons, you want to apply the theme to the outline and just show that?
That is a little trickier because the Report Map Tool allows you to adjust the outline color and size of your polygons, it doesn't automatically apply the theme, so a workaround needs to be built.
You could feed in each polygon as an individual layer but that is difficult to manage - to keep the color gradient consistent, making sure they are in the right order. And what if a new rainfall range is introduced? You might have to adjust a couple of layers to account for it.
A better option would be to turn the polygon outlines into line polygons themselves. That would allow you to apply a theme right to the outline polygons.
In order to do this, we will use the following tools:
A RecordID is assigned so that we can pull the data apart and put it back together again.
The polygons are split into detailed regions using the Poly-Split tool and rows flagged as 'holes' are removed.
The polygons are split into points.
Those points are reassembled as a sequence polyline. The create the polyline, the data is grouped by the RecordID to keep each polyline separate. (A polyline contains multiple line segments, where a line has one start and one endpoint, but can have any number of points in between. A polyline can be quite complex as in the case of road systems, or rivers.)
The sequence polylines are joined back to the original data set.
Using the reporting tools to create the maps with rainfall range as the thematic field.
With that workaround you can create a map that looks like this:
For details on tool configurations, see the attached workflow.
Let's start with the basics of how to create a report map in Alteryx. To start off, ensure that the layers you want to show in your map have a spatial object field. This can be checked by placing a select tool and confirming that there is a column of type 'SpatialObj.'
The attached Alteryx Workflow takes the color schemes from www.ColorBrewer2.org and adds them to a new XML file to be utilized as the ReportSettings.xml file installed with Alteryx. You can utilize the new color palettes under the Report Map tools. Note that these palettes will not be added to the Interactive Chart or Insight tools.
The Report Map tool allows the user to define theme settings/ranges and to modify the size, icon, and color of the display for each range, and this can be done rather easily. First, in the Map tool on the Data tab, pick which column you would like to theme off in the Thematic Field selection area: Once this column is selected, go to the Layers tab in the Map tool and expand the layer options for your theme layer. Click on the Theme and options will appear on the right. For the purpose of defining your own theme settings, you will want the Tile Method to be on Unique Value, which gives the Specific Values area. The Specific Values area is where you list what you want to theme on. For this example, we are theming off the DMA_Name so you would enter each of the DMA names you would like to theme. If you have a lot of ranges, you could also use a Summarzie tool in your module and Group By your theme column, thus giving you a list of your theme values. Run the module once to populate the Browse tool and you can then click and hold on the first row and drag down to the row of your choosing, selecting them all. Ctrl+C will copy the rows and you can paste them into the Specific Values area using Ctrl+V Once the values are entered, click on Refresh and a layer option will show up for each of the theme values you set. Now that the theme values are layers, you can go to the Style option under each layer and change the Point Style , bring in a Custom Point , change the Size , Color , modify the Outline Color and Outline Size . If you don't define all the values that are contained in the data you are bringing thru, the Map tool also provides options on what to do with these. This can also be done with number ranges with a few small changes. For Tile Method , choose Manual Tile . Enter in the cutoff for each range that you would like to be able to theme. Hit Refresh and the new layers for the theme ranges will be displayed, allowing you to modify each one. Also note that layers are created for the ranges below and above what you specify in the Cutoff Values area.
The Email Tool is a tremendously useful shortcut when it comes time to disseminate your analyses and other results straight from your workflow. However, in order to do so, it must communicate using Simple Mail Transfer Protocol (SMTP), which is often restricted by IT infrastructure and firewalls to protect organizations from spam. As a result, many users excited to try the tool get the direct, yet demoralizing, error below (among others):
That’s why we’ve detailed in this article the steps you can take to investigate what, exactly, is giving you trouble:
Manually-entered SMTP server
First make sure a colon and port number are appended to the server name:
Does this SMTP server use SSL/TLS or require username/password authentication?
Unless the SMTP server uses windows authentication you won’t be able to use the Email Tool, as SSL and TLS are not yet supported through the tool. You can, however, look into other approaches to sending emails in the Designer that can accommodate those requirements.
If not, do you have the required ports open in your network firewall? You can check with your IT team for port numbers and statuses, but the default ports you can check yourself are usually 25, 445, 465, 587, and 993:
You can check to see if a server and port are open using the Telnet utility; if you have Telnet installed, open the command prompt and simply type telnet.
If you do not see the second prompt above then you’ll have to install a Telnet/SSH third party client like PuTTY.
From either the Telnet prompt or client, you can open a connection to the server and port to test:
In Telnet, connect to the server and port using the command below.
In PuTTY, opening the port will look like the following.
Either approach will then send you to the following prompt.
Then use these commands ( <CRLF> is the enter key ) to send a test email that, if received, will indicate that your port is open.
HELO <CRLF> mail from:<mail from address> <CRLF> rcpt to:<mail to address> <CRLF> data< CRLF> subject:<email subject here><CRLF> <CRLF> <type the body of the message here> <CRLF> . <CRLF>
To send the email, you must end the body by hitting the enter key (<CRLF>), then period, then enter again (please note that after specifying your subject you must also press the enter key twice – not doing may neglect the message body argument). The test should look something like the below:
If the email sends and the mail to address confirms receipt, then your port is open. Otherwise, you should receive an error that should help your IT team diagnose why the traffic is being blocked.
Use the steps above to determine likely causes for the error and you’ll be able to take steps to get the Email Tool unrestricted in your network. Once that happens, bid adieu to whatever repetitious emails you might have to send in the future!