Gmail capability
How to apply a Gmail label
Use users.messages.modify with addLabelIds to label one message programmatically. Gmail’s Labels menu handles manual labeling from a message or a selection.
Documentation reviewed
Ways to do it
API
users.messages.modify
Send addLabelIds to add labels, or removeLabelIds to remove them.
- Requirements
- A Gmail OAuth token with gmail.modify and the Gmail message and label IDs.
- Limitations
- This endpoint changes one message at a time and expects label IDs. Use the label list to resolve a display name.
Example
{
"addLabelIds": [
"LABEL_ID"
]
}Interface
Gmail Labels menu
Select messages in Gmail, then use the Labels menu to apply the intended label.
- Requirements
- A Gmail account with access to the selected messages.
- Limitations
- With conversation view on, the label applies to the messages already in the conversation. Future replies do not inherit it automatically.