ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Gmail Macro - send emails through Alteryx

11 - Bolide

@michele - This is TheBomb.Com - Great work! Just setup and used the emailing feature to run through my GSuite accounts and it worked like a charm.  Most impressive part (for me, at least) is that that this didn't require any Run Commands or batch files or "step-child" programming.  Just some simple POSTs in the download tool.  Kudos!

7 - Meteor

@Coxta45 thanks for the feedback! I'm happy it's useful 🙂 

7 - Meteor

Hey Michele!


we got to know each other in the 2017 Alteryx Conference in London. I'm not sure if you recall.


This Macro is really great!

I've just used it to create a prototype which sends an alert to our users based on certain rules and data that we managed in Alteryx. Really cool and easy how you guys implemented the authentication for Google.


By the way: I didn't know but you need to authenticate an email within the "gmail" domain for the API call to work. At the beginning, I tried with my google account that has my company e-mail as primary email, but it doesn't work. Maybe obvious if you are in the matter, but for me it wasn't.


Thanks for sharing!



5 - Atom

Hello, is there any way to attach multiple files in one email? I can attach a single file, but can't figure out how to upload multiple files using the gmail macro.




7 - Meteor

Hi Richard,


as of now, there's no way to attach multiple files to the email. You can use the run command tool to create a zip file containing the attachments - I know it's not the same as attaching multiple files, but it could be a good workaround. 




8 - Asteroid


i'm getting an error with this macro, after setting the credentials ClientID, Scopes, Secret Token, App Enabled, i get : 

Error: GoogleOauth2 (1): Tool #27: Parse Error at char(1): Unknown variable "token_type" (Expression #1)

There's a formula tool in the Oauth2 Macro which has this assigned [token_type] + " " + [access_token], but not sure where is it coming from. Appreciate some help, please. 


5 - Atom

Hi Michele,


I get this error when I'm trying to run to get the refresh token.




7 - Meteor

Hi Michele,


This is a great tool, but it looks like I am getting an error when sending out to about 80 people.  It says "Tool # 10: There were more than 16 records in the source".  It did send out the first 17, but not any of the others.  Is there a limiter in the macro?  Thanks!

7 - Meteor

I have used Alteyrx Report tool to create the body of my email. I am using the field which is generated as the body in the report tool as the field for your “Message” Field.


However, something is going wrong and I am getting a very large string (around continuous 2 pages) code before the body of my email. Can you please help.

8 - Asteroid

Hi guys


Great idea! I'm having a couple of issues though:


ConvError: Gmail (1): Tool #77: Error message: Invalid value. at character position: 0


The error seems to be coming from the JSON parse tool (tool #77) which seems to be attempting to parse an error message


I wonder if the issue might be related to 2-factor authentication? For example to send emails via gmail's SFTP from my Tableau server I need to provide a one-time application password (


Does your macro handle App Passwords for 2FA?