archive_emails
Move older, read, or filtered emails to Archive mailbox. Preview changes with dry run before committing.
Instructions
Archive emails matching criteria by moving them to an Archive mailbox.
Safety features:
At least one filter (subject_keyword, sender, or older_than_days) is required.
dry_run=True (default) previews what would be archived without moving.
only_read=True (default) skips unread emails.
max_archive caps the number of emails moved in one call.
Args: account: Account name (e.g., "Gmail", "Work") subject_keyword: Optional keyword to filter by subject sender: Optional sender to filter by older_than_days: Optional age filter - only archive emails older than N days only_read: If True (default), only archive emails that have been read from_mailbox: Source mailbox (default "INBOX") archive_mailbox: Destination mailbox (default "Archive") max_archive: Maximum emails to archive per call (default 50) dry_run: If True (default), only preview - do not actually move emails
Returns: Summary of archived (or previewed) emails
User Preferences: {"workflow": "default", "notifications": "enabled"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sender | No | ||
| account | Yes | ||
| dry_run | No | ||
| only_read | No | ||
| max_archive | No | ||
| from_mailbox | No | INBOX | |
| archive_mailbox | No | Archive | |
| older_than_days | No | ||
| subject_keyword | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |