Skip to main content

Each email in Gmail

Go through the messages matching the Find emails (Gmail) filters, one per turn: id, thread_id, from, to, subject, date, snippet, unread, labels, received, or the whole email.

Loop type in the Google Workspace toolkit · id ooa.google/gmail_messages · 14 inputs (1 required), no outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialYesGoogle OAuth access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token.
QueryStringNoGmail search text; all messages when empty.
LabelStringNoOnly messages with this label, e.g. INBOX or Invoices.
StatusStringNoanyOnly unread or only read messages.
From containsStringNoSender contains this text; separate several with ; to match any of them.
Subject containsStringNoSubject contains these words; separate several with ; to match any of them.
SinceDateTimeNoReceived on or after this time (UTC).
BeforeDateTimeNoReceived before this time (UTC).
Has attachments onlyBooleanNofalseOnly messages with attachments.
Maximum resultsNumberNo100Stop after this many messages.
With bodyBooleanNofalseGive each email whole: text, HTML, recipients and attachment names (one more request per email); the email stays unread. Without it each email has id, from, subject, received, unread and has_attachments.
Endpoint addressStringNoReplaces https://*.googleapis.com for testing or a proxy; leave empty normally.
Oldest firstBooleanNofalseThe oldest messages first (G5).
Local timeBooleanNofalsereceived in the runner's time zone instead of UTC (G5).