What Gmail Triggers and Actions are Supported?#

Supported Triggers#

  • New Email Matching Search - Triggers when you receive a new email that matches a search string you provide.
  • New Labeled Email - Triggers when you receive a new email and label it within two days.
  • New Attachment - Triggers when you receive a new attachment (triggers once per attachment).
  • New Starred Email - Triggers when you receive a new email and star it within two days.
  • New Thread - Triggers when a new thread starts.
  • New Email - Triggers when you receive a new email.
  • New Label - Triggers when you add a new label.

Supported Actions#

  • Create Draft - Create (but do not send) a new email message.
  • Send Email - Create and send a new email message.
  • Add Label to Email - Add a label to an email message.
  • Create Label - Creates a new label.

Supported Searches#

  • Find Email - Finds an email message.

How to Get Started with Gmail on Zapier#

To get started with Gmail, first click to add a Gmail account in your Zap.

Click to add a different account

You should then get a pop-up window from Gmail asking you to log-in to authorize the connection between that Gmail account and Zapier. If you are already logged in the pop up will show right away.

Log in to authorize your Gmail account

After logging in, you'll get sent back to your zap where you now have your Gmail account connected!

Your Gmail account is authorized

You can click the Test button to make sure it is working correctly!

↑ Was this documentation useful? Yes No (Suggest Edits)

Popular Things To Do With Gmail#

Common Problems with Gmail#

I'm getting a (400) Bad Request and said "Invalid to header" error message#

This error is referring to the To: field when you send out an email:

If this error pops out, it means there's an issue with the email you're passing over to Gmail. Gmail is expecting only an email address here. For example: example@zapier.com

Make sure that the mapped field is only sending an email address without any extra details to Gmail:

Also make sure that there's data from the trigger app field:

If you need to send the email to multiple people, add each email to a separate line:

My Emails Aren't Being Sent to All of the Recipients#

Additional addresses in the To, CC and BCC field need to be separated by the + button.

Using commas, plus signs or semicolons will cause issues such as "Invalid to header" " Invalid cc header" or "Invalid bcc header".

example separated email

I have multiple files on my email but the Zap is giving me a Zip file combining all the files.#

If you need to get the files separately, use the Gmail "New Attachment" trigger instead.

I only want some attachments to trigger the New Attachment zap#

If you're using the New Attachment trigger but only want some attachments to go through to your action, you'll need to add a filter. The filtering on this trigger is a bit tricky. The field you want to use to filter out attachments is called Attachment Details Filename. You can filter on the extension (.pdf or .jpg) or on a word in the title. The filter would look something like this:

How can I attach a file to my email that's not in my trigger?#

If you have a fixed file you want to always attach to your email using the send email action, you just need to upload the file somewhere publicly first like Dropbox.

One thing to note here is that the file needs to be downloadable.

For example: http://dl.dropboxusercontent.com/s/5gw98mg8pmjxpv5/Zapier%20test%20PDF%20file.pdf?dl=0

If you click on the above link, notice how the pdf file directly downloads into your computer? This is the type of link that the attachment field needs in order to get those files attached.

To get a link like this, I suggest using Dropbox. Below is a tip on how to make a Dropbox file downloadable.

When you upload a file to Dropbox, it would give you a shareable link that starts with "https://www.dropbox.com/". What we'll need to do here is to replace "https://www.dropbox.com/" in your link with "http://dl.dropboxusercontent.com" Once you've done that, you can then copy/paste that link to the attachment field of your Action template.

So a link like this: https://www.dropbox.com/s/5gw98mg8pmjxpv5/Zapier%20test%20PDF%20file.pdf?dl=0

Would become this: http://dl.dropboxusercontent.com/s/5gw98mg8pmjxpv5/Zapier%20test%20PDF%20file.pdf?dl=0

Once you get the downloadable link, you can then copy-paste that to your Gmail action step and the file should be attached properly.

Not all my emails are triggering my Zap#

Your Zap will only see the most recent 48 hours of email in your Gmail account. This means that if your Zap is monitoring a specific label, if you add that label to an email that is older than 48 hours, your Zap will not trigger.

My Zap Triggers Every Time Someone Replies to an Email#

The "new email" trigger will trigger for each new email regardless of threading. If you only want to trigger once for the entire thread, switch to the "new thread" trigger.

Unable to trigger off star color when using "New Email Matching Search" Trigger#

If using more than one star color, you can rely on the "New Email Matching Search" Trigger rather than the "New Starred Email" Trigger in order to trigger on specific star colors. When doing so, use the following for your search string (specifically what comes after the colon)

  • Yellow star: l:^ss_sy)
  • Blue star: l:^ss_sb
  • Red star: l:^ss_sr
  • Orange star: l:^ss_so
  • Green-star: l:^ss_sg
  • Purple star: l:^ss_sp
  • Red bang: l:^ss_cr
  • Yellow bang: l:^ss_cy
  • Blue-info: l:^ss_cb
  • Orange guillemet: l:^ss_co
  • Green check: l:^ss_cg
  • Purple question: l:^ss_cp

Source

How can I style the emails I send?#

You can use HTML to style your emails. Be sure to set the "Body Type" field to HTML. You can find some tips for styling emails here

Can I get HTML Messages in a Gmail Trigger?#

Yes! Gmail triggers have a field for HTML message body as well as a field for plain text message body.

Can I send HTML Messages from Gmail in a Zap?#

Yes, be sure to set the "Body Type" field to HTML. However, if you are going to be doing marketing/sales via email, we generally recommend you use a dedicated email service rather than a Gmail Zap.

My Gmail Account Can't Send Emails Anymore#

Gmail has a sending limit of 500 emails per day to prevent abuse. Gmail will also stop allowing you to send email if enough spam complaints are triggered based on the email you send.

If you are sending automated, transactional emails of any volume, we highly suggest you switch to a dedicated transactional email provider like Mandrill, Mailgun, or Sendgrid.

Logged into the wrong Gmail account#

Does your Zap appear to be logged into the wrong Gmail account? When you connect your Gmail account, your browser may already be logged into the wrong Gmail account. Make sure when you connect you choose the correct Gmail account to authorise from the popup like this: choose account

If you are connected to the wrong account, you can try reconnecting to the right account in a new browser on your Conencted Accounts area here.

Too many simultaneous connections#

Gmail currently has a limit of 15 simultaneous connections per account. This effectively means only 15 Gmail trigger Zaps can be used at once assuming no other service is accessing Gmail on your behalf. This is a restriction from Gmail's API documented here. There are no known work arounds except some good old fashioned creativity! If you come up with something awesome, let us know.

To audit what other apps or services might be connecting to your Gmail account and remove any of them that may be unnecessary, check out this link

Gmail failed command: SELECT => socket error: EOF#

This error can occur if you use a 3rd party email client to download/view your Gmail emails, as Gmail has bandwidth limits per hour and day that could be exceeded. More info on that front here: https://support.google.com/a/answer/1071518?hl=en&ref_topic=6013516

Gmail failed: command SEARCH illegal in state AUTH, only allowed in states SELECTED#

This happens when you've selected an invalid Mailbox on your Trigger options. You can't use advanced values when selecting a Mailbox. Make sure to choose an existing Mailbox from the dropdown. If you want to create a new Mailbox to use with Zapier, do that inside Gmail and then come back to Zapier to setup your Zap.

Mailbox selection error

I'm getting a DjangoUnicodeDecodeError or LookupError unknown encoding - AKA Unsupported or Non-Standard Characters#

If you ever get this error or one mentioning unsupported or non-standard characters, this is due to Gmail and more specifically IMAP having poor support for non C0 unicode characters. This can also crop up with large attachments. Potential solutions include:

  1. Switch to using the Inbound Email triggers. This requires you to setup auto-forwarding for your Gmail account to your Zapier given inbound email address.
  2. Switch your Zap to use the IMAP trigger.

If neither of those work there is still one other option: help us improve Gmail triggers/actions. To do that follow these directions:

  1. Find the offending email address.
  2. Click the small dropdown in the email and select show original (see below).
  3. Copy and paste the entire email into a text file.
  4. Send us a support email and include the text file created in step 3.

Finding the original Gmail email

↑ Was this documentation useful? Yes No (Suggest Edits)
Get Help