StyloDocs
Workflow blocks

Search Email

Search Gmail messages with a query

View as Markdown

gmail/search-email — Search Gmail messages with a query.

Where it appears

The Search Email block lives in the Integrations group of the Workflow Builder. Connect the Gmail integration before adding it.

Fields

FieldTypeRequiredDefaultDescription
querytext (supports references)YesGmail search query using Gmail's search operators (e.g. in:inbox from:support@example.com). Use literal text or <StepName.field>.
maxResultsnumberNo25Maximum number of matching messages to return. Defaults to 25.

Inputs and outputs

Inputs are the configurable fields above. The block produces these outputs:

Outputs

Reference an output downstream with <Search Email.field>.

NameTypeDescription
successbooleanOperation succeeded
messagesarrayArray of message IDs
resultSizeEstimatenumberEstimated result count
errorstringError message if failed

Example

A minimal configuration for this block:

{
  "type": "gmail/search-email",
  "config": {
    "query": "<PreviousStep.field>",
    "maxResults": 25
  }
}

Limits and failure modes

  • Requires a connected Gmail integration. Calls fail if that integration is disconnected or its authorization has expired.
  • Required field (query) must be set, or the block fails validation before it runs.
  • On failure the error output is populated; downstream blocks that reference other outputs may not receive values.

On this page