Gmail
Gmail_ListEmailsByHeader
Search for emails by header using the Gmail API. By default returns metadata-only rows (no body/html_body). Pass include_body=True when full message text is needed. Metadata rows still include routing headers (to/cc/bcc/from/reply_to) and email_addresses.
Remote gmail
Remote (network-hosted)
Other tools also called Gmail_ListEmailsByHeader?
See providers with this name
Input Schema
{
"type": "object",
"properties": {
"body": {
"type": "array",
"items": {
"type": "string"
},
"description": "Body search terms searched anywhere in the message text. A message matches if the body contains ANY value in the list (OR-combined). A single element is treated as free text (all of its words must appear); pass multiple elements to match any of several terms. Omit to not filter by body."
},
"label": {
"type": "string",
"description": "Label name to filter by. When this is a user-created label (not INBOX, SENT, or CATEGORY_*), category-based automated filters are skipped so labeled messages are not hidden by mistake. System labels such as INBOX keep the full automated filter behavior."
},
"sender": {
"type": "array",
"items": {
"type": "string"
},
"description": "Sender names or email addresses to match. A message matches if it is from ANY value in the list (the values are OR-combined). Put each distinct person or address in its own list element; do not split one person's name across elements. A single-word element or an email address matches broadly (a first name can match that person's address); a multi-word element matches as one phrase. Omit or pass an empty list to not filter by sender."
},
"subject": {
"type": "array",
"items": {
"type": "string"
},
"description": "Subject search terms. A message matches if its subject contains ANY value in the list (OR-combined). A single-word element matches broadly; a multi-word element matches as one phrase in the subject. Omit to not filter by subject."
},
"recipient": {
"type": "array",
"items": {
"type": "string"
},
"description": "Recipient names or email addresses to match. A message matches if it was sent to ANY value in the list (OR-combined). Put each distinct person or address in its own element. A single-word element or an email address matches broadly; a multi-word element matches as one phrase. Omit to not filter by recipient."
},
"date_range": {
"enum": [
"today",
"yesterday",
"last_7_days",
"last_30_days",
"this_month",
"last_month",
"this_year"
],
"type": "string",
"description": "The date range of the email"
},
"page_token": {
"type": "string",
"description": "Pagination cursor. Omit or pass None to start from the first page (default None). Copy pagination.next_page_token from a previous response to continue; blank or whitespace-only values are rejected."
},
"max_results": {
"type": "integer",
"description": "The maximum number of emails to return (Min 1, Max 100, Default 25). Requests above 100 are clamped; the response includes limit_clamped_to_max=True when that happens."
},
"include_body": {
"type": "boolean",
"description": "Include the full plain-text and HTML message bodies on each result. Defaults to False (metadata-only rows: id, from/to/cc/bcc/reply_to, subject, snippet, labels, date, email_addresses). Set to True only when the agent needs the full message text; body and html_body are omitted entirely when False."
},
"exclude_automated": {
"type": "boolean",
"description": "Exclude obvious automated email using no-reply sender patterns and Gmail non-primary categories (promotions, social, updates, forums). Set to False when the user wants automated content like calendar invites or marketing emails. When label is a user-created label, CATEGORY_*, TRASH, or SPAM, category exclusions are skipped automatically (TRASH/SPAM skip even when mixed with other labels); noreply sender patterns still apply."
}
}
}