At Inviso, besides being huge fans of Alteryx (and Tableau), we always look into ways of automating boring and repetitive tasks in a smart and innovative way. We already generate weekly and monthly PDF reports through scheduled Alteryx workflows, but until today we couldn't really share them without having to deal with several files and repetitive emails. And, if you generate hundreds of reports each week, it can quickly become a gigantic task. To avoid this, we quickly turned to Alteryx, and we started to play with the default tools. Alteryx already includes an Email Tool; it works well if your company has an internal SMTP server, but it doesn't have a great record when working with web-based email services - and large parts of our infrastructure are based on Google's G Suite: this means that all our emails go through Gmail.
While we knew that we could easily create a small script (in Python, Ruby, or any other language..) and run it through the Run Command Tool, we wanted to develop a solution entirely based on Alteryx: we're now proud to present the latest addition to the Inviso Macro Pack: the Gmail Macro!
If you want to test out the macro, just download (or update) our Inviso Macro Pack (click here). Sidenote: you'll get access to several other cool macros, just read the brief description on this page.
Gmail Macro tutorial
Once you get the Inviso Macro pack installed, starting to use the Gmail macro is quite simple - let's have a look at the Macro's configuration window:
As you can see, the Macro offers different options: you can choose between creating a draft or directly sending the message, and you can also add attachments. You'll need to configure some field mappings that are quite self-explanatory: the "From" and "To" fields have to be email addresses, while "Subject" and "Message" will be - you guessed - the subject and the body of the email.
Last but not least: since we're using Gmail, we also need to handle authentication. But don't worry! Even though Google's APIs can be quite complex in regards to this, you just need to drag our Google Oauth2 macro into your Alteryx canvas and you'll be good to go. For a more detailed guide about this macro, have a look at the dedicated blog post.
As of now, this macro covers only some of the most common ways of using Gmail - if you have any suggestion on how to further develop it, let me know! You can send me an email through the Macro now - just put firstname.lastname@example.org in the "To" field ;)