gmail_bulk_export
Bulk-export Gmail messages matching a search query to a directory, saving message JSON, text/HTML bodies, attachments, and an index.
Instructions
Bulk-export messages matching a Gmail search query to a directory. Per message: <dest_dir>//{message.json, body.txt, body.html, attachments/...}. Also writes <dest_dir>/index.json summarizing all exported messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | Google account email. May be omitted when exactly one account is configured; required when multiple accounts are configured. | ||
| query | Yes | Gmail search query | |
| dest_dir | Yes | Absolute path; created if missing | |
| max_messages | No | Default 200 | |
| include_html_body | No | Default true | |
| include_attachments | No | Default true |