Batch Modify Gmail Message Labels
batch_modify_gmail_message_labelsAdd or remove labels across multiple Gmail messages in a single batch request, then verify which IDs changed. Streamlines bulk label management without per-message calls.
Instructions
Adds or removes labels from multiple Gmail messages in a single batch request.
Takes MESSAGE ids, not thread ids. Gmail's batch endpoint returns no per-message result and silently ignores ids it does not recognise, so by default this reads the messages back afterwards and reports which ids actually changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verify | No | Read the messages back and report per-id outcomes. Costs one extra (batched) read per id. Set False for very large sweeps where that cost matters and an unverified result is acceptable. | |
| message_ids | Yes | A list of message IDs to modify. | |
| add_label_ids | No | List of label IDs to add to the messages. | |
| remove_label_ids | No | List of label IDs to remove from the messages. | |
| user_google_email | Yes | The user's Google email address. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |