Question

Gmail New Labeled Email - Possible to trigger for multiple labels using OR/AND?


Userlevel 1

I’m currently using labels to categorize the type of support request a support related gmail account is receiving.  I am automating the creation of Salesforce Cases from the new label being added.

Currently I have 5 different categorical labels - and from what I can tell, I’m having to build 5 completely different Zaps to account for each one.

Is there any way for me to provide multiple labels in a single Zap connection and specify an OR condition should be used?

Ideally, I’d have a single Zap with multiple labels on the trigger, and a following code action to parse and decide the correct label to use.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 6
Badge +6

Hey @devinmcbride ,

 

With the current actions on Zapier it is not possible. If you have experience with making custom API calls than you can achieve this. 

 

Below is what the Zap will look like - 

 

Trigger - New email received

Action 1 - Delay for 1 minutes

Action 2 - Make custom API calls and get labels from this new email. 

Action 3 - Your Javascript code to find the label name

Userlevel 7
Badge +11

Hey there @devinmcbride! 👋

Instead of using a custom API call to get the labels as per jayeshkumarbhatia suggestion, perhaps you could try using the Find Email (Gmail) action after the Delay action. Just thinking that might be an easier way to locate the email that triggered the Zap without having to dig through Gmail’s API documentation.

Also important to note that there are certain limits as to how long the various Gmail triggers will be able to see an email for - see Not all my emails are triggering my Zap for full details:

These limits are as follows:

  • New Labeled Email - Unlimited
  • New Starred Email - 2 days
  • New Email - 1 hour
  • New Email Matching Search - 1 hour
  • New Thread - 1 hour
  • New Attachment - 1 hour


So if you’re not likely to always label the email within an hour of receiving it I’d recommend sticking with the New Labeled Email trigger instead of the New Email trigger as that has no time period limits. 

That said, I wonder if a simpler solution might be to create an additional label like “Zap” for example, which you’d add after adding the relevant category label and are ready for the email to be sent to the Zap. Then, you could have a single Zap that triggers when that “Zap” label is added and uses a Code action to check and output the correct label to be added to the new case in Salesforce?
 

Hope that helps. If you run into any further trouble or have additional questions at all please do let us know! 🙂

Userlevel 1

Thank you both @jayeshkumarbhatia and @SamB - these are very helpful.

Userlevel 7
Badge +11

You’re most welcome, @devinmcbride! 🤗

How are things going, were you able to get the desired workflow up and running? Let us know whether you’re still in need of some help at all - happy to assist further!