Best way to trigger a scenario from manually adding a label to an existing email in Gmail?

Hi everyone,

I’m looking for the most efficient and reliable way to trigger a scenario right after I manually add a specific label (e.g., “ProcessWithMake”) to an existing email in my personal Gmail account.

To be clear:

  • This is for existing emails that are already in my inbox, not for new incoming emails.

  • The trigger action is me manually applying the label. I’m not using Gmail filters for this.

  • The goal is to have this manual labeling action start a Make.com scenario.

So, my question is: What is the best practice for achieving this?

  1. Is the recommended approach to create a Google Apps Script that runs on a timer (e.g., every minute), finds the newly labeled emails, and sends a request to a Make.com webhook?

  2. Are there other, more direct methods or modules that are better suited for this “on-update” type of trigger for a personal Gmail account?

I’m trying to avoid solutions that use a lot of operations by constantly searching my entire inbox, so real-time or near real-time solutions would be ideal.

Thanks in advance for your help and insights!

Hi @Shay_Ptl,

Looking into this, but there is no instant trigger for changes on labels I am afraid. The best solution in my opinion would be to die to create a Google Apps script. Could be as simple as just triggering the webhook of a Make scenario and then fetching the mail itself for the contents such as the label. Dependent on how often you run the script, it can be quite realtime.

Cheers,
Henk

1 Like

Hello @Shay_Ptl,

Another thing to keep in mind is that Make, or something (like Google Apps Script), still needs to keep track of which labeled emails it has already processed.

What you could do is create a second label, to indicate a mail has been processed.

So now you’ll have:
ProcessWithMake
ProcessedWithMake

Use a Gmail Search Mail module (run it on a schedule like every hour) to find all mails that are labeled “ProcessWithMake”. The result is a bundle for each mail that hasn’t been processed yet.

Once it is processed, remove the “ProcessWithMake” label and add the “ProcessedWithMake” label. The next time it runs it should only find newly-labeled “ProcessWithMake” emails.

Hope that makes sense, and hope it helps.

P.S. You might be able to set up a Watch, but it’s an advanced topic and needs to be kept alive.

2 Likes

These are indeed solutions I thought of, I wanted to check if there was something more structured for this.

I also tried using Pub/Sub, but I got inconsistent results - sometimes I got only the new one marked with the label, and sometimes I got everything marked with the label.

Maybe there is no choice but to query once in, or directly in Mike or in Google Script (in shorter time frames).

@Henk-Operative @Donald_Mitchell, Thank you!