Find emails
Find Gmail messages with a Gmail search such as from:billing@acme.com is:unread and return them as a table.
Command in the Google Workspace toolkit · id ooa.google/gmail_list_messages · 14 inputs (1 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Access token | Credential | Yes | Google OAuth access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token. | |
| Query | String | No | Gmail search text; all messages when empty. | |
| Maximum results | Number | No | 100 | Maximum messages returned. |
| Include spam trash | Boolean | No | false | Also search Spam and Trash. |
| From contains | String | No | Sender contains this text; separate several with ; to match any of them. | |
| Subject contains | String | No | Subject contains these words; separate several with ; to match any of them. | |
| Since | DateTime | No | Received on or after this time (UTC). | |
| Before | DateTime | No | Received before this time (UTC). | |
| Status | String | No | any | Only unread or only read messages. |
| Label | String | No | Only messages with this label, e.g. INBOX or Invoices. | |
| Has attachments only | Boolean | No | false | Only messages with attachments. |
| Endpoint address | String | No | Replaces https://*.googleapis.com for testing or a proxy; leave empty normally. | |
| Oldest first | Boolean | No | false | The oldest messages first (G5). |
| Local time | Boolean | No | false | received in the runner's time zone instead of UTC (G5). |
Outputs
| Output | Type | What it is |
|---|---|---|
| table | Table | Columns: id, thread_id, from, to, subject, date, snippet, unread, labels, received (date and time, UTC). |
| count | Number | Number of messages. |