Gmail Get Inbox
Controlled node
Overview
Gmail Get Inbox fetches messages carrying Gmail's INBOX label from a connected Gmail account. It runs when Run is triggered and makes the result available on Messages.
The node supports a default limit of 100 messages and an offset of 0. A single request may fetch at most 500 messages.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the inbox request. | - |
| Connections | Connection | Gmail connection selected from the node's property panel. | - |
| Limit | Number | Positive integer specifying the maximum messages to fetch. Values above 500 produce an error. | 100 |
| Offset | Number | Non-negative integer specifying how many matching messages to skip. | 0 |
| Page Token | Text | Optional Gmail page token supported by the backend. The current editor class does not expose this socket. | - |
Outputs
| Output | Type | Description |
|---|---|---|
| Messages | Data | The value returned by the Gmail mail service, or an { error } object when validation or retrieval fails. |
| Done | Event | Fires after the controlled node finishes. |
Runtime behavior and defaults
- If the project context is unavailable, Messages is
{ error: "Project ID not found" }. - If no Gmail connection is selected, Messages is
{ error: "Select a connection first" }. - Limit defaults to
100; it must be an integer from 1 to 500. Invalid values return an error rather than being capped. - Offset defaults to
0; it must be a non-negative integer. Invalid values return an error rather than being corrected. - A supplied Page Token must be a string.
- If the Gmail service throws or returns no result, Messages is
{ error: "Failed to fetch inbox messages" }.
Example
To process inbox messages in pages:
- Select a Gmail account under Connections.
- Set Limit to
100and Offset to0. - Connect an event source to Run.
- Connect Messages to the nodes that filter or process the returned messages.
- For the next slice, increase Offset to
100and trigger Run again.
Check whether Messages contains an error property before treating it as mail data.