Updated October 20, 2026
Add Attachly to Chrome - FreeHome › Extensions › Attachly for Gmail › Guides › Gmail search operators for attachments
Gmail Search Operators to Find Attachments (With Copy-Ready Recipes)
By the Pick Ads team · Tested on Chrome · Published October 20, 2026 · Updated October 20, 2026
Answer: Type
has:attachmentin the Gmail search box to see every email with a file. Narrow it withfilename:pdffor a file type,larger:10Mfor size,after:2026/01/01for dates, andfrom:for a sender. Combine operators with spaces,ORand-. Then download files one by one, or select results and bulk-download.
Cheat sheet
| Operator | Example | Use |
|---|---|---|
has:attachment | has:attachment | Any email with an attached file |
filename: | filename:pdf, filename:invoice.pdf | File type or file name |
has:drive / has:document / has:spreadsheet / has:presentation | has:spreadsheet | Google Drive, Docs, Sheets or Slides links |
larger: / smaller: / size: | larger:10M | Find big emails |
after: / before: | after:2026/01/01 before:2026/04/01 | Date range |
older_than: / newer_than: | older_than:1y, newer_than:2d | Relative dates (d, m, y) |
from: / to: | from:billing@example.com | Sender or recipient |
OR or { } | {filename:pdf filename:docx} | Either term |
- | has:attachment -filename:ics | Exclude |
in:anywhere | in:anywhere filename:pdf | Includes Spam and Trash |
category: | category:purchases | Inbox categories, if enabled |
Source: Refine searches in Gmail (Gmail Help).
10 recipes
| # | Goal | Copy this |
|---|---|---|
| 1 | All PDFs | filename:pdf |
| 2 | Invoices as PDFs | filename:pdf (invoice OR receipt) |
| 3 | PDFs from one sender this year | from:billing@example.com filename:pdf after:2026/01/01 |
| 4 | Spreadsheets sent as files or Sheets links | {filename:xlsx filename:csv has:spreadsheet} |
| 5 | Images | {filename:jpg filename:png filename:heic} |
| 6 | Attachments over 10 MB | has:attachment larger:10M |
| 7 | Big and old (cleanup candidates) | larger:10M older_than:1y |
| 8 | Attachments, no calendar invites | has:attachment -filename:ics |
| 9 | Purchase emails with files in a quarter | category:purchases has:attachment after:2026/01/01 before:2026/04/01 |
| 10 | A file you may have deleted | in:anywhere filename:contract.pdf |
Tips: a space means AND. Put alternatives in { } or use OR in capitals. Group with ( ). Gmail notes that negative operators can still return a conversation if at least one message in it matches.
Find the biggest emails (free up space)
Gmail messages and attachments, including Spam and Trash, count toward the storage shared by Gmail, Drive and Photos. Each Google Account includes up to 15 GB (How your Google storage works).
- Search
larger:20M. If there are too many results, raise the number. If there are none, lower it. - Add
older_than:2yto focus on old mail. - Download what you need to keep, then delete the emails.
- Empty Trash. Gmail says deleted items in Trash still count toward storage.
size: takes a plain number, for example size:1000000. larger: and smaller: accept suffixes such as M.
Date operators and formats
Gmail's own examples accept both 2004/04/16 and 04/16/2004. Use YYYY/MM/DD to avoid confusion. Gmail's slash examples are month-first, so a European-style 05/04/2026 may be read as May 4, not April 5.
| Want | Operator |
|---|---|
| On or after a date | after:2026/01/01 |
| Before a date | before:2026/02/01 |
| One month | after:2026/01/01 before:2026/02/01 |
| Last 30 days | newer_than:30d |
| Older than a year | older_than:1y |
Free operator builder (T2)
Download what you found
Native (one message at a time)
- Open the email.
- Hover over the attachment at the bottom.
- Click Download, or Add to Drive. Some files can't be added to Drive (Open & download attachments in Gmail).
With Attachly (many messages)
- Run your search.
- Select the emails you need.
- Click Attachments in the Attachly toolbar to download their files with original filenames, or Full pack for a dated ZIP with each thread in its own folder.
Free includes up to 3 attachment exports and 3 Full pack exports a day. Premium ($6.99/month or $69.99/year) removes the limits (per getpickads.com, 2026-10-20). For the full download walkthrough, see download Gmail attachments.
Troubleshooting
| Problem | Fix |
|---|---|
| No results | Check for a typo in the operator, such as filename: with no space after the colon, and try in:anywhere |
| Too many results | Add from:, a date range or -filename:ics |
| OR seems ignored | Write OR in capitals, or use { } |
| Wrong dates | Use YYYY/MM/DD |
| Can't download | If the sender used confidential mode, you can't download the attachments |
What Attachly does not do
It doesn't search for you. Gmail's search runs the query, and Attachly acts on the emails you select. It doesn't open encrypted or confidential-mode attachments.
Last verified: 2026-10-20
Privacy: Attachly processes email content and attachments locally in your browser. See the Attachly privacy policy.
FAQ
How do I search by file type?
Use filename: with the extension, for example filename:pdf, filename:docx or filename:xlsx. Combine several types with curly braces: {filename:pdf filename:docx}. For Google Drive links instead of attached files, use has:document, has:spreadsheet or has:presentation.
How do I find emails over 10 MB?
Search larger:10M. Add has:attachment to skip large emails without files, and older_than:1y to focus on old mail. Sort through the results, download what you need, then delete the rest. Google counts Spam and Trash toward your storage, so empty Trash afterward.
Can I search inside attachments?
Why is my search empty?
The usual causes are a typo in an operator, a space after the colon, a date written in the wrong order, or mail sitting in Spam or Trash. Try in:anywhere, simplify to one operator, then add filters back one at a time.
Related guides
- Download Gmail attachments: one message or many.
- Export Gmail receipts for tax time: search recipes for receipts and invoices.
- Export Gmail for bookkeeping: save invoice emails and PDFs for your records.
Add Attachly to Chrome - Free
Sources
- Refine searches in Gmail – Gmail Help: https://support.google.com/mail/answer/7190
- Open & download attachments in Gmail – Gmail Help: https://support.google.com/mail/answer/30719
- Send attachments with your Gmail message – Gmail Help: https://support.google.com/mail/answer/6584
- How your Google storage works – Google Account Help: https://support.google.com/accounts/answer/9312312
Last verified: 2026-10-20
