Skip to main content

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

InputTypeDescriptionDefault
RunEventTriggers the inbox request.-
ConnectionsConnectionGmail connection selected from the node's property panel.-
LimitNumberPositive integer specifying the maximum messages to fetch. Values above 500 produce an error.100
OffsetNumberNon-negative integer specifying how many matching messages to skip.0
Page TokenTextOptional Gmail page token supported by the backend. The current editor class does not expose this socket.-

Outputs

OutputTypeDescription
MessagesDataThe value returned by the Gmail mail service, or an { error } object when validation or retrieval fails.
DoneEventFires 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:

  1. Select a Gmail account under Connections.
  2. Set Limit to 100 and Offset to 0.
  3. Connect an event source to Run.
  4. Connect Messages to the nodes that filter or process the returned messages.
  5. For the next slice, increase Offset to 100 and trigger Run again.

Check whether Messages contains an error property before treating it as mail data.