Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
Jeff_Neklason
8 - Asteroid

Whether you have 1, 10, or 100 workflows running on Server, it is always important to plan for flexibility from day 1. Anything manually typed into a workflow that has the potential to change can set you back and ruin what could have been a perfectly good morning by forcing you to do updates you didn’t need to. Not that this has ever happened to me.

 

Today, I want to talk about the ever-exciting topic of email distribution. I know I have your attention now. How could I not? And to make it even more exciting, I am really only talking about these fields:

 

image001.png

 

Virtually every process that gets automated has some level of communication via email built into it. Typically, this is in the form of internal error reporting, general notices that something is updated, or letting the business leaders know that something is ready. Or you may have just set up a simple email that sends a “hello” to your favorite coworker every hour for the next 10 business days. This might be why I don’t have any friends.

 

Predictably, when starting out, we all manually type in our fields for TO and CC, especially for testing. But why not have that distro list ready to import? Although I do get a thrill every time I type in my email address or the address of one of my favorite coworkers, knowing that I am about to spam them fifty times, I find it much more convenient to have it inserted.

 

So, let's get out of the manual recipient list business and do what Alteryx helps us do best. Automate and create repeatable and consistent processes.

 

To do this, I built a simple table locally that maintains the list of users that receive some sort of reporting from us and which reports they receive. This list can then be written to a table in SQL, Snowflake, or as a YXDB virtually anywhere that the Server and local users can access it. This makes distro lists highly manageable and flexible.

 

Step 1: The List Management Workflow

 

Although this can also be managed in an Excel list, I prefer to have it as a text input in the workflow. This limits the touch points and the pesky error of accidentally running the workflow while the Excel document is open (a PC Load Letter moment at its finest).

 

So, let’s get to the tactical.

 

image002.png

 

The important fields in the text input include the Email associated with the recipient, the Email and CC columns, which denote which recipient list they are included on, and then 1 column per group of reporting. Adding a group is simple and allows for long-term flexibility. There must be a “Y” in the field that the recipient is included in for it to be included in the group. You can include department to help quickly find teams, but it is not required.

 

Once created, write the list to the output of your choice!

 

image003.png

 

Example of the List management workflow:

 

image004.png

 

Step 2: Distro Process for Workflows


Once you have the All-Powerful Master list, the real fun begins. You might have noticed that there is a collection of tools below the tools in the list management workflow. This is because I don’t like to recreate the wheel every day. When I get to the reporting and communication portion of a build, I copy in the tool collection and connect it to the input list.

 

By adding this collection of tools to your workflow, you will be able to test with full functionality during Dev. I would recommend creating a “Testing” group that includes operators that typically do heavy dev. Typically, I only flag myself in the group if I am doing testing that day and then remove myself when done (all by simply updating the table from step 1 and running it back out. So simple!).

 

Implementation in a workflow

 

Below is a list of the configurations used to create the To and Cc fields. I created a fake workflow with a simple report email.

 

image005.png

 

Please note that the tools are numbered in the image above.

 

Tool 1 (Filter) Configuration: Once implemented, this is the only tool that gets updated in the process. By selecting the group from the drop-down, you update the recipient list passed to the email tool.

 

image006.png

 

Tool 2 (Select) Configuration: After the filter in tool 1, these are the only fields required beyond this point.

 

image007.png

 

Tool 3 (Transpose) Configuration: Getting twisty with the data.

 

image008.png

 

Tool 4 (Filter) Configuration: Removes the pesky blanks.

 

image009.png

 

Tool 5 (Select) Configuration: Removes unnecessary fields. I also renamed the “Name” column to “Header” because I am easily confused, and it made the next tool’s configuration simpler.

 

image010.png

 

Tool 6 (Cross Tab) Configuration: Getting more twisty with the data, which gets Email and CC on the same row.

 

image011.png

 

At this point, you can view the distro list in the results following tool 6. It should look like this:

 

image012.png

 

Tool 7 (Append) Configuration: I love a good append. Not sure why @mceleavey is so afraid of them.

 

image013.png

 

Tool 8 (Email) Configuration: Follow your typical configuration for your email tool. When selecting the To and From, check “Use Field” and select the appropriate value from the drop-down list.

 

image014.png

 

I hope that you find this helpful in simplifying the maintenance aspect of your life! This simple process can be copied into any process that sends out emails and allows you to maintain those distribution lists in a single process.

 

If you managed to read this whole thing to this point, you deserve an award. Turn to your favorite coworker and ask them for a high five. Tell them it is because you deserve it. If you are remote, you can high five yourself in the mirror.

Comments
mceleavey
17 - Castor
17 - Castor

@Jeff_Neklason , I'm not scared of the Append tool, I'm just wary of putting it in the hands of a puppy with a flamethrower.

 

Great rundown of this, by the way. Big time saver.

Jeff_Neklason
8 - Asteroid

@mceleavey I think that is because you have been the puppy in that scenario once or twice. There is no better way to quickly turn a million rows into a billion rows (I say as I hide my flamethrower under my desk).

mceleavey
17 - Castor
17 - Castor

That would be a fair assessment, yes.

DelHansen
8 - Asteroid

Tell us about this awesome company that you work for, and about your great co-workers!