Search emails
Full-text search across an account's email. Same filters as list_emails; "query" is the search text.
search_emails
Full-text search across an account's email. Same filters as list_emails; "query" is the search text.
Permissions
Required capabilities: mail.read.
Inputs
| Name | Required | Type | Details |
|---|---|---|---|
accountId | No | string | Account to operate on. Optional when exactly one account is connected. Minimum length: 1. |
query | Yes | string | Search text |
folder | No | string | Folder role (inbox, sent, drafts, trash, spam, starred, archive, all) or a label/folder name Minimum length: 1. |
from | No | string | None |
to | No | string | None |
subject | No | string | None |
unreadOnly | No | boolean | None |
starredOnly | No | boolean | None |
hasAttachment | No | boolean | None |
after | No | string | ISO date, inclusive Minimum length: 1. |
before | No | string | ISO date, exclusive Minimum length: 1. |
rawProviderQuery | No | string | Escape hatch passed verbatim to the provider (e.g. Gmail q= syntax) |
pageSize | No | integer | Defaults to 25 Minimum: 1. Maximum: 100. |
pageToken | No | string | nextPageToken from a previous call Minimum length: 1. |
{
"type": "object",
"properties": {
"accountId": {
"type": "string",
"minLength": 1,
"description": "Account to operate on. Optional when exactly one account is connected."
},
"query": {
"type": "string",
"description": "Search text"
},
"folder": {
"type": "string",
"minLength": 1,
"description": "Folder role (inbox, sent, drafts, trash, spam, starred, archive, all) or a label/folder name"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"subject": {
"type": "string"
},
"unreadOnly": {
"type": "boolean"
},
"starredOnly": {
"type": "boolean"
},
"hasAttachment": {
"type": "boolean"
},
"after": {
"type": "string",
"minLength": 1,
"description": "ISO date, inclusive"
},
"before": {
"type": "string",
"minLength": 1,
"description": "ISO date, exclusive"
},
"rawProviderQuery": {
"type": "string",
"description": "Escape hatch passed verbatim to the provider (e.g. Gmail q= syntax)"
},
"pageSize": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Defaults to 25"
},
"pageToken": {
"type": "string",
"minLength": 1,
"description": "nextPageToken from a previous call"
}
},
"required": [
"query"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Last updated
Modify emails
Batch-modify emails using the actions allowed for this connection. Moving requires folder; labels require labels.
Send email
Send an email from the user's connected account; this actually delivers mail, so prefer it over browser automation or leaving a draft when the user asked to send. Three modes: direct (to + subject + body), sending an existing draft (draftId), or replying (replyToMessageId, optionally replyAll) where recipients, subject, and threading are derived from the original. Confirm with the user when intent is ambiguous. Add sendAt to any mode to schedule instead of sending now.