List Emails
List Gmail messages with optional search, labels, and paging.
Type
google.gmail.list_emailsListed only when a matching connected service is enabled.
List Emails returns message and thread ids from the connected Gmail mailbox. It does not return full bodies. Follow with Get Email for one message, or Get Thread for the conversation.
Search uses the same syntax as the Gmail search box. Type a query in one line and insert context with {{ }} (for example from:{{ args.email }} newer_than:7d).
Configure
| Setting | Description |
|---|---|
| Search query (optional) | Gmail search string. Liquid template, for example from:{{ args.email }} is:unread |
| Label IDs (optional) | Comma-separated label ids, for example INBOX,UNREAD |
| Max results | Page size, 1–500. Default 20 if empty |
| Page token (optional) | nextPageToken from a previous list |
| Include spam and trash | When on, spam and trash can appear in results |
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Out (source) | Continues after the list returns |
Pipe schema
The next block reads this on the data pipe (pipe.value):
| Key | Type | Description |
|---|---|---|
messages | list | Each item has id (message id) and threadId |
nextPageToken | text | Pass to the next list for the following page |
resultSizeEstimate | number | Approximate match count (may not be exact) |
Use case
- Find unread inbox mail, then get each message and write a table row.
- Page with
nextPageTokenuntil it is empty when you need more than one page.