bulk_update_labels
Add or remove labels on many Proton Mail messages in one operation using UIDs or search criteria. Preview changes with a dry run before applying.
Instructions
Add or remove Proton labels on many messages in one operation. Provide EITHER uids OR match (XOR), plus at least one of labelsToAdd / labelsToRemove. Same label-path rules as update_message_labels (must start with "Labels/"). Supports dryRun: true for safe preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Source folder containing the messages (default: INBOX). Messages stay here; labels are additive. | INBOX |
| uids | No | Explicit UIDs to label, scoped to `folder`. Mutually exclusive with `match` — provide exactly one. | |
| match | No | Search criteria selecting the messages to label. Mutually exclusive with `uids`. | |
| labelsToAdd | No | Full label paths to add, each starting with `Labels/` (e.g. ["Labels/Work"]). Each label must already exist (create it with create_label). At least one of labelsToAdd/labelsToRemove must be non-empty. | |
| labelsToRemove | No | Full label paths to remove (e.g. ["Labels/Work"]). Removing a label a message does not carry is a silent no-op. | |
| dryRun | No | When true, preview the exact UIDs that would be updated without changing any labels. |