search_emails
Search emails across any mailbox with advanced filters including subject, sender, attachments, read status, date range, and flag color. Get results as text or JSON.
Instructions
Unified search tool - search emails with advanced filtering across any mailbox.
Args: account: Account name to search in (e.g., "Gmail", "Work") mailbox: Mailbox to search (default: "INBOX", use "All" for all mailboxes, or specific folder name) subject_keyword: Optional keyword to search in subject sender: Optional sender email or name to filter by has_attachments: Optional filter for emails with attachments (True/False/None) read_status: Filter by read status: "all", "read", "unread" (default: "all") date_from: Optional start date filter (format: "YYYY-MM-DD") date_to: Optional end date filter (format: "YYYY-MM-DD") include_content: Whether to include email content preview (slower) max_results: Maximum number of results to return (default: 20) output_format: "text" (default, human-readable) or "json" (structured list of email dicts) flag_color: Optional flag color filter: red, orange, yellow, green, blue, purple, gray
Returns: Formatted list of matching emails with all requested details
User Preferences: {"workflow": "default", "notifications": "enabled"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sender | No | ||
| account | Yes | ||
| date_to | No | ||
| mailbox | No | INBOX | |
| date_from | No | ||
| flag_color | No | ||
| max_results | No | ||
| read_status | No | all | |
| output_format | No | text | |
| has_attachments | No | ||
| include_content | No | ||
| subject_keyword | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |