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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Connection name | variable | Required | gmail | Name of the connection created by 'Authorize Gmail'. |
| Search query (Gmail syntax) | string | Optional | Same 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 | Optional | Only messages with these labels (names or ids, comma separated). e.g. INBOX, IMPORTANT, or a custom label name. Example: INBOX Supports variables | |
| Include spam & trash | dropdownNo · Yes | Optional | No | |
| Max messages | number | Optional | 50 | |
| Store DataTable in | variable | Required | messages |
More Gmail commands
Ready to automate your busywork?
Start your free 10-day trial today. No credit card, no commitment.