Workflow blocks
Gmail
Trigger workflow when new emails are received in Gmail
trigger/gmail — Trigger workflow when new emails are received in Gmail.
Where it appears
The Gmail block is a trigger — it starts a workflow. Add it from the Triggers group in the Workflow Builder.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
pollingInterval | select | Yes | 5min | How often Stylo checks the Gmail inbox for new messages. Options: 1min, 5min, 15min, 30min, 1hour. |
searchQuery | text | No | — | Gmail search syntax to filter which incoming emails trigger the workflow. Leave empty to fire on any new email. |
markAsRead | toggle | No | false | When enabled, matched emails are marked as read in Gmail after triggering the workflow. |
Inputs and outputs
Inputs are the configurable fields above. The block produces these outputs:
Outputs
Reference an output downstream with <Gmail.field>.
| Name | Type | Description |
|---|---|---|
triggered | boolean | Whether trigger fired |
timestamp | string | Trigger timestamp |
email | json | Email data (object — fields: subject, from, to, body, date) |
Example
A minimal configuration for this block:
{
"type": "trigger/gmail",
"config": {
"pollingInterval": "5min",
"markAsRead": false
}
}Limits and failure modes
- Requires a connected Google integration. Calls fail if that integration is disconnected or its authorization has expired.
- Required field (
pollingInterval) must be set, or the block fails validation before it runs.