Gmail

Gmail_SearchThreads

Search for threads in the user's mailbox.

Remote gmail

Remote (network-hosted)

Other tools also called Gmail_SearchThreads? 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 thread 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."
    },
    "sender": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sender names or email addresses to match. A thread 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 thread 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."
    },
    "label_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Label IDs to filter by. When every ID is a user-created label or CATEGORY_*, or when any ID is TRASH or SPAM, category-based automated filters are skipped so labeled messages are not hidden by mistake. Other system label IDs such as INBOX keep the full automated filter behavior. TRASH and SPAM also opt the search into those folders automatically."
    },
    "recipient": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Recipient names or email addresses to match. A thread 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 threads to return (Min 1, Max 100, Default 25). Requests above 100 are clamped; the response includes limit_clamped_to_max=True when that happens."
    },
    "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 every label_ids entry is a user-created label or CATEGORY_*, or any entry is TRASH or SPAM, category exclusions are skipped automatically; noreply sender patterns still apply."
    },
    "include_spam_trash": {
      "type": "boolean",
      "description": "Whether to include spam and trash in the results. Defaults to False. Automatically set to True when label_ids includes the TRASH or SPAM system labels, because Gmail excludes those folders from search unless they are opted back in."
    }
  }
}
          

Provider

Gmail →