Actions8
- Message Actions
- Thread Actions
Message → Get Many
AI-generatedSummary
Retrieve multiple Gmail messages or threads for a delegated mailbox using a Google Service Account with optional filtering and output simplification.
Inputs
- Service Account Email (required) — The service account email used for authentication.
- Private Key (required) — The private key for the service account (entered as a password field).
- Delegated Email (required) — The Gmail user email whose mailbox will be accessed (user to impersonate).
- Return All — Whether to fetch all matching messages/threads or limit results.
- Limit — Maximum number of results to return when Return All is false (1-500).
- Simplify — Return simplified parsed data (extracted fields and parsed attachments) instead of raw API response.
- Filters — Filter criteria to narrow messages/threads by including spam/trash, label IDs, search query, read status, received date range, or sender email/name.
- Options — Additional options such as downloading attachments and customizing attachment property prefixes (only for messages in simplified mode). Also whether to return only messages for threads.
Output shape
a list of messages or threads
Each returned item corresponds to one message or thread JSON object. If Simplify is true for messages, the raw base64 content is parsed into fields like subject, from, to, text, html, and attachments. Attachments can be included as binary properties if requested. Pagination is handled internally when 'Return All' is selected, otherwise results are limited up to 'Limit'.
Examples
Example 1: Get up to 50 unread messages received after a certain date, simplified with attachments
Set Service Account Email, Private Key, Delegated Email, select Resource = Message, Operation = Get Many, Return All = false, Limit = 50, Simplify = true, and add Filters for unread and Received After date, enable downloadAttachments in Options.