Skip to main content
gmail.modifyLabels atomically adds and removes labels across messages in one Gmail request.

Example

Move new messages from a Triage label to a Processed label:
Both labels must already exist in the selected Gmail account.

Inputs

Provide at least one non-empty add or remove list. Inputs accept compatible signals. Label IDs must match exactly. The action matches display names after trimming surrounding whitespace and ignoring capitalization. You may mix names and IDs in either list. If the action can’t resolve a requested label, it fails before modifying messages.

Output

Returns a Signal<string[]> with the modified message IDs in input order.
The action changes labels on individual messages. Supplying Gmail system labels such as INBOX, UNREAD, or STARRED changes the corresponding Gmail state.