get_flagged_emails
Retrieve flagged emails from Apple Mail accounts to identify important messages requiring attention. Specify account, mailbox, and limit parameters to filter results.
Instructions
Get flagged emails from a mailbox.
Args: account: Account name. Uses JXA_MAIL_DEFAULT_ACCOUNT env var or first account if not specified. mailbox: Mailbox name. Uses JXA_MAIL_DEFAULT_MAILBOX env var or "Inbox" if not specified. limit: Maximum number of emails to return (default: 50)
Returns: List of flagged emails sorted by date (newest first).
Example: >>> get_flagged_emails("Work") [{"subject": "Important task", "flagged": true, ...}, ...]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | ||
| mailbox | No | ||
| limit | No |