Tick what you are looking for (file type, keywords, sender, quarter, size) and get the exact Gmail search instantly. Copy it or open it straight in your inbox. No sign-up, and nothing is sent to any server: everything happens in your browser.
Works with personal Gmail and Google Workspace · Uses only official Gmail search operators
One click fills in the form; then adjust anything you like.
None ticked = any file type. Several are combined with "or".
Any one of them is enough. Phrases with spaces are put in quotes automatically.
Several, comma separated (from:).
Added with a minus sign in front (-from:).
Useful if invoices arrive at an alias or shared mailbox (to:).
Written as after:YYYY/MM/DD and before:YYYY/MM/DD. Quarters are calendar quarters (Q1 = Jan–Mar). "Until" does not include that day: for all of September, set it to October 1.
newer_than:
older_than:
larger:
in:
Search only inside one of your labels (label:). Spaces become hyphens, as Gmail does.
The link opens the first Gmail account in your browser (/u/0/). The search is built in your browser and is not sent to any server.
Type them into the Gmail search bar with no space after the colon. A space between two operators means "and": the email has to match both.
| Operator | What it does | Example |
|---|---|---|
has:attachment | Emails with at least one attachment. | has:attachment |
filename: | Attachments with an extension or a word in the file name. | filename:pdf · filename:invoice |
from: / to: | Sent by, or sent to, an address or domain. | from:supplier.com |
subject: | A word or phrase in the subject line. | subject:(invoice OR receipt) |
after: / before: | Received on/after or before a date, in YYYY/MM/DD format. | after:2026/07/01 before:2026/10/01 |
newer_than: / older_than: | Newer / older than a period: d days, m months, y years. | newer_than:3m |
larger: / smaller: | By email size (attachments included). Use K or M. | larger:10M |
label: | Emails with one of your labels. | label:vendors |
in: | A specific folder: inbox, sent, spam, trash… or anywhere to include Spam and Trash. | in:anywhere |
is:unread | Unread emails only. | is:unread |
category: | Inbox tabs: primary, promotions, social, updates, forums. | -category:promotions |
OR · { } | One criterion or the other. Curly braces group alternatives without typing OR. | {filename:pdf filename:xml} |
- (minus) | Excludes whatever follows it. | -from:newsletter@store.com |
" " · ( ) | Quotes for an exact phrase; parentheses to group. | "purchase order" |
Source: Gmail Help, "Refine searches in Gmail".
10/01/2026 is ambiguous and can be read the wrong way. Always use 2026/10/01.before: includes that day. It does not: Q3 is after:2026/07/01 before:2026/10/01.from: amazon does not filter by sender; type from:amazon.OR in capitals; in lowercase it searches for the word "or".has:attachment.in:anywhere.larger:10 means 10 bytes; type larger:10M.If you run the same search every month, let Gmail label those emails as they arrive:
Use the "Open in Gmail" button or paste it into the search bar. For a filter, remove the dates (after:, before:, newer_than:), is:unread, in: and label:: a filter applies to new mail, so those criteria make no sense there.
Click the "Show search options" icon on the right of the search bar, then Create filter.
Tick Apply the label and create a new one, for example "Invoices". Optionally tick Also apply filter to matching conversations to label the ones you already have.
From then on, label:invoices after:2026/07/01 before:2026/10/01 gives you the quarter's invoices in a second.
The search tells you where the invoices are, but they are still inside Gmail. To send them to your bookkeeper or accountant, or keep them on file, you have to download them or save them to Drive one by one, every month. And if you also get invoices in Outlook or on your own domain's mailbox, you repeat it for each inbox.
Inbox2Drive does that step for you. It connects Gmail, Outlook and IMAP mailboxes, classifies each attachment with AI (invoice, receipt, contract, pay stub…) and saves it into organized Google Drive or Dropbox folders by type, date or sender. It can also import past emails, so what you would find today with a search gets filed the same way. It never sends or deletes email. How it works with Google Drive · with Dropbox.
Free plan, no credit card · Questions? Email us at marketing@inbox2drive.com
It is free and runs entirely in your browser: the search is built on your device and is not sent to any server. The "Open in Gmail" button only opens your own Gmail with the search filled in; we do not need access to your email.
The most common reasons: the email is in Spam or Trash (add in:anywhere), the date is written as MM/DD/YYYY instead of YYYY/MM/DD, the invoice came as a download link rather than an attachment (remove has:attachment), or the file has a different extension (for example .zip instead of .pdf).
The link uses /mail/u/0/, which is the first account you signed in to in your browser. If you have several, change the 0 to 1, 2 and so on in the address bar, or copy the search and paste it into the search box of the right account.
Yes, the search box in the Gmail app accepts the same operators. Copy the search and paste it into the app's search box.
Not natively: Gmail only lets you save attachments to Drive one at a time with the Drive icon. To do it automatically you need a script, an add-on or a tool such as Inbox2Drive.
Inbox2Drive connects Gmail, Outlook and IMAP, classifies attachments with AI and saves them into organized Google Drive or Dropbox folders.
Create a free accountFree plan · No credit card required · Help by email at marketing@inbox2drive.com
Using Outlook instead? Try the Outlook search builder for attachments & invoices.