Search Gmail Emails
The Search Gmail Emails block queries a connected Gmail account using standard Gmail search syntax and returns matching email messages.
Search and retrieve emails from a Gmail account
The Search Gmail Emails block queries a connected Gmail account using standard Gmail search syntax and returns matching email messages. You provide a search query string — such as filtering by sender, subject, or read status — and the block fetches up to the specified number of matching emails, with a default of 5 and a maximum of 10 per request. If you pass an empty query string, the block returns the most recent inbox emails.
The block requires a Google OAuth connection ID to authenticate with Gmail. You can configure the output format as either JSON or plain text, and results are stored in a destination variable of your choosing. Each returned email includes fields for the Gmail message ID, subject, sender, recipient, date, plain text body, HTML body (when available), and a comma-separated list of label IDs.
This block fits into workflows that need to monitor, process, or respond to incoming email — for example, triaging support requests, extracting data from invoices or notifications, or triggering downstream actions based on email content. It works well as an entry point in automation pipelines where Gmail is the data source.
What you can build
Real-world workflows powered by the Search Gmail Emails block.
Support Ticket Triage
Search for unread emails in a support inbox and route them to the appropriate team or response workflow based on subject or sender.
Invoice Data Extraction
Query emails with subjects containing 'invoice' and extract structured data from the plain text or HTML body for accounting workflows.
Lead Follow-Up Automation
Retrieve emails from a specific sender or domain and trigger a CRM update or follow-up message based on the email content.
Daily Email Digest
Fetch the most recent inbox emails each morning and compile a summary report delivered through another channel or stored in a database.
Order Confirmation Monitoring
Search for emails matching order confirmation patterns and parse delivery details to update an order tracking system.
Alert and Notification Detection
Periodically search for emails from monitoring services or alert systems and trigger downstream actions when specific notifications arrive.
Ready to add Search Gmail Emails to your workflow?
Get Started FreeCommon questions about Search Gmail Emails
What parameters are required to use this block?
The block requires a Gmail search query string and a Google OAuth connection ID that has Gmail readonly scope. You also configure the export format (JSON or text), the result limit (1–10, defaulting to 5), and an optional destination variable to store the output.
What does the block return for each email?
Each email in the results array includes the Gmail message ID, subject, from address, to address, date, plain text body, HTML body (if available), and a comma-separated string of label IDs.
How do I retrieve recent inbox emails without a specific search filter?
Pass an empty query string to the query field. The block will return the most recent emails from the inbox up to the configured limit.
What Gmail search syntax does the query field support?
The query field accepts standard Gmail search syntax, such as 'from:user@example.com' to filter by sender, 'subject:invoice' to match subjects, or 'is:unread' to return only unread messages.
What kinds of workflows is this block commonly used in?
This block is commonly used as a data source in workflows that process incoming emails — such as support triage, invoice extraction, lead management, order tracking, or alert monitoring — where Gmail is the starting point for downstream automation.
Related capabilities
List Recent Gmail Emails
List recent emails from the connected Gmail inbox.
Get Gmail Unread Count
Get the number of unread emails in the connected Gmail inbox.
List Gmail Labels
List all labels in the connected Gmail account. Use these label IDs or names with the Update Gmail Labels step.
Send Gmail Draft
Send an existing draft from the connected Gmail account.
Get Gmail Attachments
Download attachments from a Gmail email and re-host them on CDN.
Set Gmail Read Status
Mark one or more Gmail emails as read or unread.
Add Search Gmail Emails to your workflow
Build powerful AI workflows with drag-and-drop blocks. No coding required.