batch_email_action
Perform bulk actions (archive, trash, move, mark read/unread, star, restore, delete) on known email IDs in one IMAP pass.
Instructions
Apply one action to a known list of email IDs in a single IMAP pass. Use when you already have the IDs and want to archive, trash, move, mark-read/unread, star/unstar, restore, or permanently delete them. Actions: mark_read, mark_unread, star, unstar, archive, trash, restore, move (requires targetFolder), delete (permanent expunge). Supports dryRun. Prefer bulk_delete when selecting messages by search criteria (from/subject/date) rather than by ID. Prefer apply_thread_action when acting on a thread by threadId. Prefer empty_folder to clear an entire folder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| dryRun | No | Preview the impact without mutating the mailbox. | |
| emailIds | Yes | Composite email ids as an array or a comma-separated string. | |
| targetFolder | No | Destination folder. Required when action is 'move'; optional for 'restore' (defaults to INBOX). | |
| continueOnError | No | Continue applying the action after an individual failure. |