Gmail Trigger
Type ID: gmailTrigger · Kind: Trigger · Trigger style: poll · Ports: 1 in, 1 out (0 in when used as the workflow's root trigger)
Polls the Gmail API on an interval and triggers the workflow when new emails matching the configured filters are received.
Credentials
Gmail
Properties
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|---|---|---|---|---|---|
| Poll Interval | pollIntervalMs | number | Yes | 90000 | Defines the interval, in milliseconds, at which Gmail is checked for new emails. A minimum polling interval of 90 seconds is enforced; any value below 90,000 ms will default to 90,000 ms | Always |
| Event | event | options | Yes | messageReceived | messageReceived (Message Received) | Always |
| Output | output | options | No | simple | simple (Simplified), raw (Raw), fields (Select Included Fields) | Always |
| Fields | fields | checkbox | Yes | [] | id, threadId, labelIds, snippet, historyId, internalDate, payload, sizeEstimate, raw, classificationLabelValues | output = fields |
| Include Attachments | includeAttachments | boolean | No | false | Download message attachments and return them as binary data | Always |
| Filters | filters | object | No | {} | See sub-table | Always |
| Options | options | object | No | {} | See sub-table | Always |
filters (object)
| Property | Key | Type | Required | Default | Possible values |
|---|---|---|---|---|---|
| Read Status | readStatus | options | No | unread | both (Unread and read messages), unread (Unread messages only), read (Read messages only) |
| Sender | sender | string | No | '' | Email address to match (from:) |
| Subject Contains | subjectContains | string | No | '' | Text the subject must contain (subject:) |
| Has Attachment | hasAttachment | boolean | No | false | Only return messages with attachments |
| Label | label | string | No | INBOX | Gmail label, e.g. INBOX, SENT, IMPORTANT |
options (object)
| Property | Key | Type | Required | Default | Possible values |
|---|---|---|---|---|---|
| Mark as Read | markAsRead | boolean | No | false | Mark emails as read after triggering |
| Max Emails Per Poll | maxEmails | number | No | 10 | Max emails processed per poll (clamped to 1-50) |
Notes
- If no emails match the filters within the poll window, the node returns
nulland the workflow does not trigger. readStatus,label,sender,subjectContains, andhasAttachmentcombine into a single Gmail search query; matches are further checked against the precise poll window since Gmail's date filter is day-granular.- Emits one item containing
emails(array) and asummary(count,subjects,senders,pollInterval,polledAt). - If
markAsReadis set, matched emails have theirUNREADlabel removed (best-effort); ifincludeAttachmentsis set, attachments are downloaded into the item's binary data.