Alteryx workflow events: How to set up automatic emails for various workflow outcomes

by Nathan Purvis

Background

It’s fairly reasonable that users may want to receive emails regarding the performance of their workflows. Has it started on time? When did it end? Were there any errors? Even just an alert every run where they can see some profiling information. Luckily, using workflow events we can do all of this and have the ability to do so for manual runs, as well as workflows that are executed on a desktop scheduler or Alteryx Server.

Getting started

Alteryx workflow events are actually incredibly easy to set up. For emails, there is a prerequisite that you’ll need to know the correct SMTP settings - these can be set up as a one off, or you can use credentials already stored in the data connection manager (DCM) both locally or via Alteryx Server if your server administrator has already created this connection and shared it with you.

To get started, users just need to hit any whitespace on the canvas in order to show the ‘Workflow’ configuration options. After this, navigate to the ‘Events’ tab, ensure ‘Enable Events’ is selected and then ‘Add’ > ‘Send Email…’, as shown below:

After that, you can then set up the event configuration, with the crucial aspects being:

  1. Run Event When - decide when to trigger the workflow

  2. Use Data Connection Manager (DCM) - if you have email credentials saved already, use them (though they need to be synced with Server). If not, set up a new connection like the demonstration screenshot just below

  3. From & To Email addresses - who is the email being sent from and to?

  4. Subject - email subject

  5. Attachments - anything you may want to attach i.e. a report/supporting document. Here I’ve just attached a GIF to show the feature in action

  6. Body - the main body content of the email that will be sent to the recipient. Here you can plug in various workflow variables, as seen inside the percentage symbols below. Many of the most reasonable/necessary bits of information are pre-populated in the configuration menu.

The ‘Run Event When’ options are very self-explanatory, but for the sake of example, we’re going to look at a scenario where we want to be notified when there is an error in the workflow. To do so, we’ll just take a very simple list of names:

Here we can see ‘A’, ‘B’ and ‘C’, but what if we wanted to check for ‘D’ and send out an email when that is missing? Well to do so we can simply filter and then perform a test on whether the count is 1 or not:

As illustrated above, when this test isn’t satisfied, we get a ‘test X failed’ error message which then triggers the email we set up earlier, containing all of the information and any attachments we selected. If we hop on over to my inbox then we can see how that all looks:

And that concludes our very quick overview of using workflow events to send out alerts/performance notifications regarding your Alteryx workflows. As usual, we hope you found this useful and would love to hear any feedback, criticism and suggestions for future content!

Previous
Previous

Creating partitioned record IDs/ranks in Alteryx Designer

Next
Next

Why and how I built a SQL Join tool for Alteryx Designer