Gmail: Search Messages

Search the mailbox with Gmail's query syntax (e.g. 'is:unread from:boss@x.com newer_than:7d') and return matches as a DataTable (messageId, threadId, from, to, subject, date, snippet).

GmailGmailSearchMessages

What it does

Search the mailbox with Gmail's query syntax (e.g. 'is:unread from:boss@x.com newer_than:7d') and return matches as a DataTable (messageId, threadId, from, to, subject, date, snippet).

Parameters

ParameterTypeRequiredDefaultDescription
Connection namevariable
RequiredgmailName of the connection created by 'Authorize Gmail'.
Search query (Gmail syntax)string
OptionalSame syntax as the Gmail search box. Blank = all mail.
Example: is:unread from:boss@example.com newer_than:7d
Supports variables
Label filter (optional)string
OptionalOnly messages with these labels (names or ids, comma separated). e.g. INBOX, IMPORTANT, or a custom label name.
Example: INBOX
Supports variables
Include spam & trashdropdown
No · Yes
OptionalNo
Max messagesnumber
Optional50
Store DataTable invariable
Requiredmessages

More Gmail commands

Ready to automate your busywork?

Start your free 10-day trial today. No credit card, no commitment.