modifyLabels adds and removes multiple labels across one or many messages in a single Gmail request. Use it when a workflow stage should replace several labels atomically instead of running separate label actions.
Example
Move new messages from aTriage label to a Processed label:
Inputs
Provide at least one non-empty
add or remove list. Every input field also accepts a compatible Signal; the example passes email.messageId directly.
Label IDs must match exactly. Display names are matched after trimming surrounding whitespace and ignoring capitalization, and names and IDs may be mixed in either list. If any requested label cannot be resolved, the action fails before modifying messages.
Output
The action returns aSignal<string[]> containing 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.