0
votes

I'm new to using google apps script. I wanted to create a script that queries the inbox for messages from a particular sender and assign them labels. But I could not find any api that would assign a label to a message.

Note : "Need to assign label to a message and not to a thread"

Is there an api or any method to achieve this using google apps script?

1

1 Answers

0
votes

I don't think it's possible with GAS, but you could try using the modify() method of Gmail API https://developers.google.com/gmail/api/v1/reference/users/messages/modify?hl=ru

Gmail API is available as an Advanced Service in GAS that must be enabled first. In Script Editor, go to 'Resources' -> 'Advanced Google services..'