update_email_status
Mark emails as read or unread, flag or unflag them, using filters like subject, sender, age, or specific message IDs for precise control.
Instructions
Update email status - mark as read/unread or flag/unflag emails.
When message_ids is provided, uses exact ID matching (ignores other filters). Otherwise filters by subject, sender, and/or age.
Args: account: Account name (e.g., "Gmail", "Work") action: Action to perform: "mark_read", "mark_unread", "flag", "unflag" subject_keyword: Optional keyword to filter emails by subject subject_keywords: Optional list of subject keywords; matches any keyword sender: Optional sender to filter emails by mailbox: Mailbox to search in (default: "INBOX") max_updates: Maximum number of emails to update (safety limit, default: 10) apply_to_all: Must be True to allow updates without any filter message_ids: Optional list of exact Mail message ids for precise targeting older_than_days: Optional age filter - only update emails older than N days flag_color: Optional flag color for the "flag" action: "red", "orange", "yellow", "green", "blue", "purple", or "gray". Omit to flag without setting a color — Mail shows its default (red), or the message's previous color if one remains from an earlier flag. Re-colors messages that are already flagged.
Returns: Confirmation message with details of updated emails
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| sender | No | ||
| account | Yes | ||
| mailbox | No | INBOX | |
| flag_color | No | ||
| max_updates | No | ||
| message_ids | No | ||
| apply_to_all | No | ||
| older_than_days | No | ||
| subject_keyword | No | ||
| subject_keywords | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |