Dynamic labeling with Gmail - Modify email Labels

I’m building an automation for my inbox. One of the steps is to apply labels to the email. I have a set of about 15 labels. I initially created a route (label module) for each label. It looked ugly and soon I got an error message from the system saying that I have too many scenarios running.
ChatGPT and Gemini suggested combining them all in one module and instead of picking a specific label from the list to apply simply link it to Label field coming form JSON module. Sounds like it should work but I get an error message 400 (invalidArgument): Invalid label. I checked all the labels on gmail and they are all formatted the same way, no hidden characters or extra spaces etc.
Can anyone help here?


Hey Vasily,

you cant map the labels directly. They are not technically text. Its Label_121234 or whatever number after it. Try selecting a label and then toggle the map button to see what the actual label ID is. You will then need a switch function or module to change the incoming label name to the specific ID.

Mate we don’t advertise our services here, only offer solutions. Please go and read the forum guidelines and stop spamming.

2 Likes

Legend! Thank you. It worked!

1 Like