nœuds / builtin / trigger
New email
Start the workflow when a new email arrives in Gmail
Ce contenu n’est pas encore disponible dans votre langue.
Start the workflow when a new email arrives in Gmail: in the inbox, under a label, or matching a search.
What it does
Section titled “What it does”Every Check every minutes, the trigger looks at the newest 25 emails of the Label (the inbox when empty) that match the Search, and starts one run with the ones it hasn’t seen yet.
A check that finds nothing new starts no run. Press Run to fetch a test event: the latest items, without moving the trigger’s position.
When to use it
Section titled “When to use it”- Save invoices from billing emails to Google Drive.
- Turn emails with a label into tasks.
- Get a notification when a specific sender writes.
Inputs and settings
Section titled “Inputs and settings”| Réglage | Type | Ce que cela fait |
|---|---|---|
| Connection (obligatoire) | Credential | |
| Label | Text | A Gmail label; empty = Inbox. |
| Search | Text | Gmail search words. Only matching emails start a run. |
| Check every | Number | At least 1 minute, only while the workflow is On. Par défaut : 5 |
| On the first check | Choice | Options: Skip what’s already there, Start with the latest. Par défaut : Skip what’s already there |
| How many to start with | Number | For “Start with the latest” and Fetch test event (1–20). Par défaut : 3 |
Search takes Gmail’s own search words, for example from:billing@example.com has:attachment. Only matching emails start a run.
Outputs
Section titled “Outputs”-
Output
Each run returns a list of items with these fields:
| Field | Type | What it holds |
|---|---|---|
| id | Text | |
| threadId | Text | |
| snippet | Text |
[ { "id": "…", "threadId": "…", "snippet": "…" }]One item per new email, with its id and the message details Gmail returns.
Dependencies and credentials
Section titled “Dependencies and credentials”- Connection (connection, OAuth2): required. See Create a connection.
Example workflow
Section titled “Example workflow”- New email with Search
has:attachment subject:invoice. - Gmail gets the attachment.
- Google Drive uploads it to an Invoices folder.
Common issues
Section titled “Common issues”- It misses some emails: a check reads the newest 25 matching emails. With a busy inbox, check more often or narrow the Search.
- Not working on the connection: reconnect Gmail on the Connections page.
Related nodes
Section titled “Related nodes”- Polling triggers: how every “New …” trigger checks.
- Gmail: send, read and label emails.
- Schedule Trigger: run at fixed times instead.