Save Time with Dynamic Emails (using Alteryx)

Recently, we converted our Tableau licenses from perpetual to subscription-based. As a result, I had to send everyone with a Tableau Desktop license a new Tableau Creator license key. Each email had to be customized to that individual person and include the license key they were assigned. Now, I know Tableau allows you to assign keys in the portal, but that has to be done manually for each key AND users receive a not-so-pretty email that can't be customized. 

Instead, my team maintains an Excel file of all license keys and who they belong to. As people request licenses, we manually send them a customized email with their license key and some helpful information to get started. This is easy enough when it's done sporadically, but to send new license keys to EVERYONE was a tall (and boring) order. I knew there had to be a better way and then I remembered Alteryx has the capability to send emails.

The first thing I needed to do was prepare the data I needed for each email. This is what I used, but you can absolutely customize to your needs. Basically, you need to consider what changes between when you send an email to Person A and Person B.

  • The first name of the employee (used in the greeting)
  • Their email address (where is the email being sent)
  • Their shiny, new license key

Prepare the Data

I exported the new keys from Tableau's Customer Portal and pasted them alongside my existing Excel file of Tableau Desktop users (this part was a random assignment). Then, I needed email addresses for each users, which exist in the Postgres database that lives behind Tableau Server. So I connected to the database and built a quick table using the system_users table. I had to do a vlookup from this data to my Excel file. Finally, I used a space to delimit first name from last name. Your data may be formatted differently, obviously. Once I had my data in the format required, I turned to Alteryx.

Build the Workflow

The first tool I used was a text input tool, though you could use the basic input tool and connect to your Excel file. The text input tool allows you to copy and paste in your data, though, so for something as one-off as this, I went that route.

The second tool was the report tool, which can be used in many different ways. In this case, I created a new field for the text I was creating and called it "Email Body". I entered the text I wanted included in the body of the email to be sent, using the "Available Fields" drop down to insert the pieces of dynamic text to be used. If you're familiar with Tableau's tooltips where you can insert elements of data, it's exactly like that. I also bolded certain sentences and included links. All of these options and more are available from the format menu.

The third and final tool was the email tool. The "Enabled" box needs to be checked if it's going to actually send emails. The SMTP section needs to be filled in as well. I don't know what SMTP is, and though I'm sure a Google search could educate me, I just get it from our IT infrastructure team. For any field that is dynamic (the recipient, for example), the "Use Field" box needs to be checked. Otherwise, you can enter a static value. In this case, I don't have any attachments, but I do want to use the dynamic Email Body field I created with report tool, so I have to select the "Use Field" box and from the dropdown, select the appropriate field.

Use Cases

There are many possible uses for this simple workflow.
  • Conduct an A/B test to see which subject line or email body people respond to best.
  • Customize attachments to each user based on their interests.
  • Personalize the contents of each email based on notes associated with each person.
  • Provide a status report and customized statistics for each recipient.
  • Dynamically change the time to be in the relevant time zone.

Coffee Break

Now that you've saved yourself some time, take a coffee break! Oh, and here is a template you can play around with.