bulk_delete
Remove multiple emails at once using explicit IDs or filters like sender, subject, or date. Choose to move to trash or permanently delete, with dry-run preview.
Instructions
Delete multiple emails by explicit ID list or by search criteria (from/subject/date/flags). Use when you have specific IDs to delete or want to filter by sender, subject, or date range. Accepts emailIds[] OR match criteria (XOR). permanent:true permanently expunges; false moves to Trash. Use dryRun to preview. Prefer empty_folder to clear an entire folder. Prefer delete_email for a single message. Prefer batch_email_action when the same set of IDs needs a mix of actions, not just deletion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | Search criteria. XOR with emailIds. | |
| dryRun | No | ||
| folder | No | Source folder (required with match). | |
| emailIds | No | Explicit email IDs. XOR with match. | |
| confirmed | No | Required when permanent:true and PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled. | |
| permanent | No | Permanently expunge (irreversible). False = move to Trash. | |
| maxBatchSize | No | Maximum number of messages to process. Defaults to 500. Use to prevent runaway operations. |