Skip to main content
Question

Getting "invalid label" error when assigning custom labels to Gmail emails

  • February 10, 2025
  • 1 reply
  • 6 views

This post was split from the topic: 

 

Hello, it worked! I am having another issue with assigning labels to e-mails. It works when Label is Static but when it is Custom is does not work...:

Custom:
 

Static:
 


Many thanks for helping me with this!

Did this topic help you find an answer to your question?

1 reply

SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7472 replies
  • February 11, 2025

Yay! I’m so glad to hear the webhook is working now, ​@saranobrega! 🎉

Hope you don’t mind but as you’re running into a different issue now, I converted your reply into this new topic so we can address it separately.

Ok, so with dropdown fields like that Label field, when a custom value selected the ID for the corresponding option to be selected is expected—rather than the option’s name. In the Label field you can see the ID for each label will appear just under the name of the label.

For example, in the following screenshot you can see that for the test-label label I created in my own Gmail account it has an ID of Label_1272586595321939040:

a3f6c855da6d09e81e88be72b51374b0.png
 

To have the Zap automatically the ID supplied automatically you might want to look at using a lookup table to convert the label name that ChatGPT supplies into the corresponding label ID. You can learn more about how to use lookup tables in Zaps here: Create lookup tables in Zaps.

Alternatively, you could update the prompting on that ChatGPT action to output the relevant label ID instead of the label name. 

Let me know how that goes, happy to help if you get stuck on that or have any questions! 🙂