What is your goal?
After processing an email in Make.com, I need to remove a label and add another one using the same Gmail > Modify Labels module.
What is the problem & what have you tried?
Adding the label works perfectly, but removing the label fails, the label stays in Gmail even though the module runs without errors in the execution logs
Error messages or input/output bundles
Used Gmail > Modify Labels module with the correct Message ID (not Thread ID)
Verified both label IDs are correct (adding works with the same IDs)
Toggled mapping mode and manually entered the label ID (e.g., Label_5728053835095781131)
Confirmed Continue execution is enabled on the module
Screenshots (scenario flow, module settings, errors)
Hi @Sindbad
From your explanation and from the screenshot I can see your input section clearly shows that labels to add: (Array) is empty and labels to remove: (Array) is also empty.
If you’re using mapping please turn the map toggle off for both fields and simply use the dropdown menus to manually check the boxes for the labels you want to add and remove.
It can still work with the “mapping” on provided empty or null values aren’t passed during the request.
Hey there,
is the email part of a thread or is it a single message? Check out this thread.
I’ve tried both ways. First with the toggle off and then on.
is the email part of a thread or is it a single message?
I have two branches: one for sent emails (single email) and one for inbound threaded emails. Inbound emails now get both ‘Inbox’ and ‘Staffing’ labels automatically. After the workflow runs, I want to replace ‘Staffing’ with ‘Processed’ so I don’t have to recheck them.
Will check out the other post. Thanks
I just did a quick test and it worked on my side. It both removed the current label and added the new one no issue.
Can you maybe check if your credentials have the https://www.googleapis.com/auth/gmail.labels scope in it?
What I’ve Already Checked (Based on Community Suggestions):
-
Message ID (Not Thread ID):
- The user who solved their issue said they were using the
Message ID of a reply instead of the original.
- I’ve confirmed my
Modify Labels module is mapping the Message ID (not Thread ID) from my Gmail module. This was already in place before I posted.
-
Label ID vs. Label Name:
- Another user pointed out that you can’t map labels directly as text; you need to use the underlying Label ID (e.g.,
Label_5728053835095781131).
- I’ve tried this as well. When I toggle the “Map” button in the
Labels to Remove field, I see the raw Label ID. I’ve even tried pasting it directly. Adding still works, removing still fails.
-
Connection Scopes & Reauthorization:
- A user asked me to check if my connection has the
https://www.googleapis.com/auth/gmail.labels scope.
- My Gmail connection already has the
gmail.modify scope, which should cover label modifications. I attempted to reauthorize the connection, but I saw a red exclamation point and the process didn’t seem to complete properly. Is this a sign of a deeper connection issue?
The Sticking Point:
Given the above, I’m stuck on a few points:
- Since both adding and removing are done in the same module with the same IDs, why would one operation work and the other fail? Is there a known bug in the
Modify Labels module where removeLabelIds behaves differently than addLabelIds?
- Could the “red exclamation point” on reauthorization be the root cause? If so, what’s the proper way to fix a broken Gmail connection in Make? Should I delete and recreate it?
My Setup:
- Module:
Gmail > Modify Labels
- Source:
Message ID from Gmail > Search Emails module
- Adding:
Processed label (selected from dropdown or mapped ID)
- Removing:
Staffing label (selected from dropdown or mapped ID)
- Gmail Connection Scopes:
gmail.readonly, openid, gmail.modify, userinfo.email, userinfo.profile
Yes, you do need the labels scope, not just the modify one.
And a red exclamation when reauthorizing means an issue with the connection, which can also cause this. Try adding the scope and verifying the connection.
Verifying the connection turned out to be ok - green check mark
I edited the existing connection and added the scope https://www.googleapis.com/auth/gmail.labels to the Additional Scopes field. After saving, I ran the workflow again.
The Outcome
Label Removal Still Fails. The Modify Labels module runs without errors, but the Staffing label remains on the email. Here’s the output from the module:
Input
- Labels to add: (Array) – contains "Processed" (or its ID)
- Message ID: 19eb155a48c452fe
- Labels to remove: (Array) – contains "Staffing" (or its ID)
Output
- Message ID: 19eb155a48c452fe
- Thread ID: 19e799065781f778
- User label folders: (Array) – still shows the label
Key observation: The User label folders output still contains the Staffing label, confirming it was never removed.
Ok this is weird. Is it possible that something is readding the staffing label back?
Cause when I tested it it worked:
I started from scratch with two modules (gmail search and label update) and this is working (at least for single email, haven’t tested threads) . Even reauthorization is working properly - no explanation point. I need to check what’s wrong in my scenario. One thing I noticed. gmail needs a minute to update and remove staffing label while processed is added immediately
Please try to use a separate module to just remove a label and then use another to add. I think this can help us pinpoint the genesis of the problem.
Also I recommend you try adding a Gmail get an email module right before the first modify labels module. Then try to use the message ID from there. It could also be possible that the problem is from Gmail.
Also try removing system labels and see how it goes. If removing system labels works then the problem might be related to your custom label ID.
Thanks for the suggestions. Here’s what I’ve tried so far:
1. Separate modules for adding and removing labels
- I simply removed “add label” and only used “remove label” in the
Modify Labels module
- The module runs without errors, but the
Staffing label still remains on thread emails.
2. Added a Get an Email module before the label modules
- I placed a
Gmail > Get an Email module right before the Modify Labels module.
- I used the
Message ID from the Get an Email module as the source for the label removal.
- The label still wasn’t removed from thread emails.
Key observation: The issue is specific to email threads. Single emails work fine – the label is removed without any problems. For thread emails, the Staffing label persists even though the module runs without errors.
Any further ideas?
Based on what I’ve tested, here’s a workaround I’m considering:
-
Keep the Staffing label on emails (don’t remove it at all).
-
Add a Processed label after the email is successfully processed (this already works reliably).
-
Modify the Gmail search query to fetch only emails that have Staffing but do NOT have Processed: label:Staffing -label:Processed
-
After processing, add the Processed label. The email will then be excluded from future searches.
Why This Should Work:
-
The -label:Processed part handles deduplication by excluding already-processed emails.
-
Since I no longer need to remove Staffing, the label removal issue becomes irrelevant. (I could still remive them manually with a couple of clicks in gmail with emails labeled processed)