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

Engine Works Blog

Under the hood of Alteryx: tips, tricks and how-to's.
Meteoroid

I am a fan of automated processes. Repeated processes should definitely be automated. Even though I don't want to have to push the button(s) to make it go, I do need the process to give me feedback. And since it's not going to ask me to coffee, I'll take email. I find relief in scanning my inbox and seeing that the world is okay. And when the world isn't? I would rather know before my customers, and my boss.

 

I've talked before about the event properties in Alteryx and leveraging them for process feedback. We're taking it a step further. We have a working prototype of a configurable email tool for Alteryx. I'm very excited to escort it to it's coming out party today!

 

The tool takes seven inputs configured via XML. The SMTP Server is a static value and if not defined, Alteryx will attempt to auto-detect it. The other inputs can be defined in the XML or dynamically with values upstream. "To" and "From" are required, optionally "cc", "bcc", "subject", the body and the path of any attachments can be added.

 

To demonstrate the tool, I wrote a module that'll send employees the following email on their birthday:

 

Pretty nice, right? The salutation is dynamic; the rest of the email is static.

 

I started with a text input with fname, lname, email and bday. For simplicity I wrote the birthday as mmdd. I have a formula tool defining today as mmdd (formatting the DateTimeToday function as a string %m%d). Next I filter on today, flow into a text tool defined as:

 

Hi [fname],
Today is your birthday! Feel free to take the day off, have an expensive lunch
and bill it to the company.
We love you,
your management

 

And then, the magic! The email tool's XML:

<SMTPServer>use_your_ownemail</SMTPServer>
<ToIsField value="true" />
<To>email</To>
<CcIsField value="false" />
<Cc></Cc>
<BccIsField value="false" />
<Bcc></Bcc>
<FromIsField value="false" />
<From>cwilliams@extendthereach.com</From>
<SubjectIsField value="false" />
<Subject>Happy BirthdayBody</Subject>
<BodyIsField value="true" />
<Body>Body</Body>

 

ToIsField is true because I am using the field value for email from the data stream; it is not statically defined in the XML. FromIsField is false for the same reason, I am defining it within the XML. I could CC the employee's manager if my source supported that.

 

If there are two people with the same birthday? Two separate personalized emails are sent, one to each birthday person. This is a double-edged sword. I cannot recommend setting up the email tool unless you are confident you know what your output looks likes. One email is sent for each record. Read that again, one email per record.

 

A summarize tool ahead of the email will take care of that. Or create a macro that writes the output to a file and drop the macro in a module that will email the previously created output. There are multiple solutions available to control the business process.

 

The tool is still in early beta. Let us know if you'd like to be kept up to date about its street date.

Comments

Is it possible to format emails generated from Event function? Right now you get plain text format and I would like to make them HTML formatted.

Alteryx Alumni (Retired)

Unfortunately, you cannot format the text of an email sent via an Email Event. To get HTML style formatting in emails sent from workflows, you would need to use a series of Reporting tools, and use their content as the body of an email using a Report Email tool.

Labels