Aident logoAident logo centerAident Loadout
Use CasesPricingDocs
ENStart Now
AppsGmail ToolsGmail Fetch Emails
Gmail Tools

Gmail Fetch Emails

Fetches a list of email messages from a Gmail account, supporting filtering, pagination, and optional full content retrieval. Results are NOT sorted by recency; sort by internalDate client-side. The messages field may be absent or empty (valid no-results state); always null-chec…

Write actionRisk level 2 of 5OAuth connection
Use Gmail Fetch Emails

Pricing and limits

Aident logo

Product

Aident LoadoutAident Playbook EditorOpen-CUAK

About

AppsSkillsUse CasesDocsBlogPricingDownloadsPrivacy PolicyTerms of Service

Alternatives

vs Composiovs Zapier
llms.txtGet an AI summary of Aident LoadoutSummarize with ChatGPTSummarize with ClaudeSummarize with GeminiSummarize with Perplexity

© Aident Labs, 2024-2026

Pricing
Free
Unified payment
Not currently supported

Inputs

  • querystring
    Gmail advanced search query (e.g., 'from:user subject:meeting'). Supported operators: 'from:', 'to:', 'subject:', 'label:', 'has:', 'is:', 'in:', 'category:', 'after:YYYY/MM/DD', 'before:YYYY/MM/DD', AND/OR/NOT. IMPORTANT - 'is:' vs 'label:' usage: Use 'is:' for special mail sta…
  • user_idstring
    User's email address or 'me' for the authenticated user. Non-'me' addresses require domain-level delegation; without it, authentication or not-found errors result.
  • verboseboolean
    If false, uses optimized concurrent metadata fetching for faster performance (~75% improvement). If true, uses standard detailed message fetching. When false, only essential fields (subject, sender, recipient, time, labels) are guaranteed. Body content and attachment details req…
  • ids_onlyboolean
    If true, only returns message IDs from the list API without fetching individual message details. Fastest option for getting just message IDs and thread IDs.
  • label_idsarray
    Filter by label IDs; only messages with all specified labels are returned (AND logic). Optional - omit or use empty list to fetch all messages without label filtering. System label IDs: 'INBOX', 'SPAM', 'TRASH', 'UNREAD', 'STARRED', 'IMPORTANT', 'CATEGORY_PRIMARY' (alias 'CATEGO…
  • page_tokenstring
    Token for retrieving a specific page, obtained from a previous response's `nextPageToken`. Must be a valid opaque token string from a previous API response. Do not pass arbitrary values. Omit for the first page. Loop calls using nextPageToken until it is absent to avoid silently…
  • max_resultsinteger
    Maximum number of messages to retrieve per page. Default of 1 retrieves only a single message; set higher for practical use. Hard cap is 500 per page.
  • include_payloadboolean
    Set to true to include full message payload (headers, body, attachments); false for metadata only. payload may still be null even when true; use GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID for guaranteed complete content. When payload is present, bodies are base64url-encoded in payload.pa…
  • include_spam_trashboolean
    Set to true to include messages from 'SPAM' and 'TRASH'.

Observable output

  • data
    Required
    Data from the action execution
  • errorstring
    Error if any occurred during the execution of the action
  • successfulboolean
    Required
    Whether or not the action execution was successful or not

Skills that use this Action

Related use cases

No verified related use cases are linked yet.

Official source

Provider source

Skills that use this Action

No published Skills explicitly reference this Action yet.