StyloDocs
Workflow blocks

Gmail

Trigger workflow when new emails are received in Gmail

View as Markdown

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

FieldTypeRequiredDefaultDescription
pollingIntervalselectYes5minHow often Stylo checks the Gmail inbox for new messages. Options: 1min, 5min, 15min, 30min, 1hour.
searchQuerytextNoGmail search syntax to filter which incoming emails trigger the workflow. Leave empty to fire on any new email.
markAsReadtoggleNofalseWhen 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>.

NameTypeDescription
triggeredbooleanWhether trigger fired
timestampstringTrigger timestamp
emailjsonEmail 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.

On this page