Skip to main content
The Search Messages action searches a Gmail mailbox and returns matching message IDs. Its query uses the same operators as Gmail’s search bar.

Inputs

The date inputs are appended to the Gmail query using after:YYYY/M/D and before:YYYY/M/D. You can combine them with operators in Query:

Outputs

This action returns identifiers only. Repeat over Message IDs and use Get Message by ID when you need subjects, bodies, or attachments.

Example: process recent invoices

Configure Search Messages with:
  • Querysubject:invoice has:attachment
  • After Date — The start of the current month.
Repeat over the returned Message IDs and pass each one to Get Message by ID to load the invoice email’s content and attachments.

Troubleshooting

Test the same query in Gmail, check the date boundaries, and enable Include Spam & Trash if those folders should be searched.
Increase Max Results up to 100. The action returns a single result page and does not expose pagination.