Workflow blocks
Search Email
Search Gmail messages with a query
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
query | text (supports references) | Yes | — | Gmail search query using Gmail's search operators (e.g. in:inbox from:support@example.com). Use literal text or <StepName.field>. |
maxResults | number | No | 25 | Maximum 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>.
| Name | Type | Description |
|---|---|---|
success | boolean | Operation succeeded |
messages | array | Array of message IDs |
resultSizeEstimate | number | Estimated result count |
error | string | Error 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
erroroutput is populated; downstream blocks that reference other outputs may not receive values.