Fluxmail

Search emails batch

Search up to 20 accounts with one portable query and return one result group per account.

search_emails_batch

Search up to 20 accounts with one portable query and return one result group per account.

Permissions

Required capabilities: mail.read.

Inputs

NameRequiredTypeDetails
accountsYesarray of objectNone
queryYesstringTyped portable search syntax Minimum length: 1.
folderNoinbox or sent or drafts or archive or spam or trash or allNone
fromNostringNone
toNostringNone
subjectNostringNone
readNobooleanNone
starredNobooleanNone
hasAttachmentNobooleanNone
afterNostringYYYY-MM-DD received date, inclusive in UTC Minimum length: 1.
beforeNostringYYYY-MM-DD received date, exclusive in UTC Minimum length: 1.
pageSizeNointegerDefaults to 25 Minimum: 1. Maximum: 100.
includeSnippetNobooleanRequest or suppress message previews
{
  "type": "object",
  "properties": {
    "accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "pageToken": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "accountId"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 20
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Typed portable search syntax"
    },
    "folder": {
      "type": "string",
      "enum": [
        "inbox",
        "sent",
        "drafts",
        "archive",
        "spam",
        "trash",
        "all"
      ]
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "read": {
      "type": "boolean"
    },
    "starred": {
      "type": "boolean"
    },
    "hasAttachment": {
      "type": "boolean"
    },
    "after": {
      "type": "string",
      "minLength": 1,
      "description": "YYYY-MM-DD received date, inclusive in UTC"
    },
    "before": {
      "type": "string",
      "minLength": 1,
      "description": "YYYY-MM-DD received date, exclusive in UTC"
    },
    "pageSize": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "Defaults to 25"
    },
    "includeSnippet": {
      "type": "boolean",
      "description": "Request or suppress message previews"
    }
  },
  "required": [
    "accounts",
    "query"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Last updated

On this page