move_email
Move emails between mailboxes using subject, sender, or date filters. Preview matches with dry run mode, or move only read emails when archiving.
Instructions
Move email(s) matching filters from one mailbox to another.
Supports subject, sender, and date filters. Use dry_run=True to preview matches without moving. Set only_read=True to skip unread emails (useful for archiving). For archiving to "Archive", just set to_mailbox="Archive". Pass message_ids to move specific messages by exact id (ignores other filters; same fast path as update_email_status).
Args: account: Account name (e.g., "Gmail", "Work") to_mailbox: Destination mailbox name. For nested mailboxes, use "/" separator (e.g., "Projects/Amplify Impact") subject_keyword: Optional keyword to search for in email subjects from_mailbox: Source mailbox name (default: "INBOX") max_moves: Maximum number of emails to move (default: 50, safety limit) subject_keywords: Optional list of keywords to match in subjects; matches any keyword sender: Optional sender to filter emails by older_than_days: Optional age filter - only move emails older than N days dry_run: If True, preview what would be moved without acting (default: False) only_read: If True, only move emails that have been read (default: False) message_ids: Optional list of exact Mail message ids for precise targeting. When set, all other filters are ignored.
Returns: Confirmation message with details of moved emails
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sender | No | ||
| account | Yes | ||
| dry_run | No | ||
| max_moves | No | ||
| only_read | No | ||
| to_mailbox | Yes | ||
| message_ids | No | ||
| from_mailbox | No | INBOX | |
| older_than_days | No | ||
| subject_keyword | No | ||
| subject_keywords | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |