bulk_update_flags
Add or remove IMAP flags on multiple emails at once using explicit IDs or search criteria. Returns flags the server silently dropped.
Instructions
Add or remove IMAP flags on multiple messages simultaneously. Accepts emailIds[] OR match+folder (XOR). Returns notApplied[] per message for flags the server silently dropped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailIds | No | Explicit email IDs. XOR with match. | |
| match | No | Search criteria. XOR with emailIds. | |
| folder | No | Source folder (required with match). | |
| flagsToAdd | No | IMAP flags to set, e.g. ["\\Seen", "\\Flagged"]. | |
| flagsToRemove | No | IMAP flags to clear. | |
| dryRun | No | ||
| maxBatchSize | No | Maximum number of messages to process. Defaults to 500. Use to prevent runaway operations. |