Blog
11 min read

Find Every Email With an Attachment in Gmail and Outlook

Founder and CEO, The Drive AI

TL;DR: In Gmail, type has:attachment in the search box and narrow it with filename:pdf, larger:5M, older_than:1y or from:. In classic Outlook, type hasattachment:yes; in new Outlook and Outlook on the web, run a search and select Files, or use Sort > Has files. All of them find the message, not the document, which keeps whatever name the sender gave it; the last sections cover that gap.

The attachment you need arrived months ago, from someone whose name you half remember, named something like Scan_0043.pdf. Gmail and Outlook can both narrow thousands of messages to the ones carrying a file of the right type, size and age. This guide collects the operators with worked examples, the clickable versions, the Outlook thread problem, and what to do when search finds the message but the file still has a useless name. Operators and menu names come from Google's and Microsoft's own help pages, checked November 2, 2026.

How do you find emails with attachments in Gmail?

Type has:attachment into the Gmail search box and press Enter. Every message with a file attached is listed, newest first, and each additional operator you add narrows the list. (Gmail search operators)

Worked examples, each one a string you can paste:

  • has:attachment lists every message that carries a file.
  • has:attachment from:accounts@northwind.com narrows it to one sender. Google's own examples are from:amy@example.com and from:me.
  • filename:pdf finds attachments by type; a full name such as filename:homework.txt works too.
  • filename:invoice finds attachments with that word in the name. A vendor who names files INV4411.pdf will not match, which is the first sign of the limit covered later.
  • larger:5M keeps only messages over 5 MB. Google's storage page suggests has:attachment larger:10M for finding the biggest ones, and filename:.pdf larger:5M for big PDFs. (Manage your storage)
  • older_than:1y and newer_than:2d take d, m or y. For a window, use after:2026/01/01 before:2026/06/30.
  • has:drive finds messages that include Google Drive files rather than classic attachments.

Operators combine with spaces, so a search for a lost contract looks like this:

from:accounts@northwind.com filename:pdf larger:1M after:2026/01/01

If the search is about clearing space rather than finding a file, the size operators are the start of a different job: how to delete large email attachments.

Where is Gmail's advanced search form?

Click Show search options, the sliders icon at the right end of the search box, and a form opens with From, To, Subject, Has the words, Doesn't have, Size, Date within and Search (a dropdown for labels, Spam and Trash). (Gmail advanced search)

  1. Open the options. In the search box, click Show search options.
  2. Fill in the fields you know. For a lost attachment, Size and Date within are the two that narrow the most; From and Has the words do the rest.
  3. Click Search, then add a chip. Google documents the attachment filter as a chip under the search box after a search runs, not as a field in the form. The chips are From, Any time, Has attachment (with Google Docs, Google Sheets or PDF as sub-options), Exclude calendar updates, To, Is unread and Is encrypted.

The free email attachment search builder does the same from a sender, file type, size, age and name fragment, for Gmail or Outlook.

How do you find all emails with attachments in Outlook?

It depends on which Outlook you have. Classic Outlook for Windows takes a typed operator, hasattachment:yes; new Outlook and Outlook on the web use the Files tab and the filter button. (Find all messages with attachments in Outlook)

Classic Outlook. Click the search box at the top of the message list, type hasattachment:yes and press Enter. Microsoft's search reference also accepts hasattachment:true, and its attachments page writes it hasattachments:yes; both forms work in classic Outlook. Or click into the search box and select the Has Attachments button on the Search Tools ribbon. (How to search in Outlook)

Narrow it with the operators Microsoft documents:

  • hasattachment:yes from:"Dana Reyes" for one sender. You can also type from: and the first letters of a name.
  • hasattachment:yes subject:invoice for a subject word.
  • received:1/15/2026 for a day, or received:"this week", "last month", "last year", today and yesterday. Quotes are needed around multi-word dates. In current builds the Received refiner no longer accepts days of the week or month names.
  • messagesize:>5 MB for size. The named sizes (messagesize:tiny through messagesize:enormous, where enormous means over 5 MB) still work in classic Outlook but are marked not supported in new Outlook for Windows.

Microsoft's search reference lists no file-type operator; search part of the file name as a keyword, then narrow to messages with files.

New Outlook and Outlook on the web. Four routes, all documented on the same page:

  1. Search, then Files. Click the Search box, type a keyword and select Files. The results show only messages with attachments that match.
  2. Advanced Search. Select the filter button to the right of the search box and check the Attachments box.
  3. Refine. After a search runs, select Has attachments under the Refine group.
  4. Sort. With no search at all, select Sort > Has files to bring every message with an attachment to the top of the folder.

How do you find attachments inside a long Outlook thread?

Microsoft publishes nothing specific about this. Neither its search reference nor its attachments page has a step for one conversation, so the practical method is to search the thread's subject with the attachment operator, which returns only the messages in that thread that carry a file.

  1. Search the subject with the attachment filter. In classic Outlook: subject:"Lot 14 subcontract" hasattachment:yes. Each message in the thread that has a file appears as its own row, so a 40-message conversation becomes the three or four that matter.
  2. In new Outlook or on the web, search the subject words and select Files. The same messages come back.

Expanding the conversation and scanning for paperclips works for short threads only, and either way a contract re-attached to four replies is four results.

Can you find emails with attachments in Outlook mobile?

Yes. Tap the Search icon and look under Files for recent attachments; for an older one, type something you remember and switch on the Attachments filter, the paper clip icon. Microsoft documents this for iOS (Search email attachments in Outlook mobile) and for iOS and Android together (What's the fastest way to search for an attachment). Neither page gives typed operators for mobile.

What does attachment search not find?

Search finds the message, and the document is still inside it, named whatever the sender called it. Three limits follow.

  • The name is the sender's. filename:invoice finds attachments someone named "invoice", not Scan_0043.pdf, document(3).pdf or INV4411.pdf, which is most of what arrives. Neither Google's nor Microsoft's operator pages describe searching by what a file contains; you can filter on sender, date, size, and the attachment's name and type.
  • The result is a list of messages. To get the file you still open each one. If there are dozens, see how to download all attachments from Gmail and how to download all attachments from Outlook.
  • The search is one-off. Tomorrow's attachment lands with the same anonymous name.

Two things that look like search failures are not. A message that search finds but whose file will not open is a client problem, covered in Outlook attachments not showing and Gmail attachments not downloading. And an attachment in an archive or a previous mailbox needs the method in how to find old email attachments.

How do you make attachments searchable by what they say?

Take the attachments out of the mailbox once, read them, and name them by their contents. Then the question "the Northwind invoice from March" is answered by the file rather than by the message it came in.

In The Drive AI, connect the Gmail or Outlook account (Microsoft-hosted mailboxes only: Microsoft 365, Outlook.com and custom domains on Microsoft hosting). Then either:

  • Run Historical Sync for the backlog. From Settings > Integrations, the account's menu offers the last 30, 90 or 180 days, or 365 on Outlook, with sent mail optional. The attachments land at the top level of the workspace as they are, scanned PDFs included; images and calendar files are skipped. A workflow that watches new uploads then reads each one, names it from the vendor, date and type on the page, and files it into the folder your instructions name.
  • Set up an Email Attachment workflow for new mail. Its first step is always Save a Copy, into The Drive AI or a connected Google Drive, OneDrive, SharePoint or Dropbox folder; the steps after it read, rename and move the file. The sender, subject and email text are read as context, never as instructions.

Afterwards the search is "invoices from Northwind over $5,000" against the documents themselves, and the mailbox is untouched: no email is moved, labelled or deleted. Connected email needs Max or any Team plan; workflows on uploaded files work on every plan. Steps that read a file can occasionally be wrong, which is what approval and undo are for. The general method is in how to save email attachments to folders; the wider field is in the roundup of email attachment management software.

Gmail and Outlook attachment search operators

A syntax reference, from the same two help pages. Outlook's search reference covers classic Outlook and new Outlook for Windows and Outlook.com; where a row differs by version it says so.

What you wantGmailOutlook
Any attachmenthas:attachmenthasattachment:yes (classic); Files tab or Sort > Has files (new, web)
A file typefilename:pdfNot documented; keyword plus Files
A word in the file namefilename:invoiceKeyword plus Files
Larger or smaller thanlarger:5M, smaller:1Mmessagesize:>5 MB, messagesize:<10 KB
Older or newer thanolder_than:1y, newer_than:2dreceived:"last year", received:"this week"
On or between datesafter:2026/01/01 before:2026/06/30received:1/15/2026
From one senderfrom:amy@example.comfrom:"bobby moore"
Cloud links, not fileshas:driveNot documented

Frequently Asked Questions

How do I search Gmail for emails with attachments?

Type has:attachment in the Gmail search box. Add from:, filename:, larger: or older_than: to narrow it, for example has:attachment from:accounts@northwind.com older_than:6m. The Has attachment chip under the search box does the same with a click.

What does has:attachment filename:pdf do?

It lists messages carrying an attachment whose name ends in .pdf; filename: already implies an attachment, so has:attachment is redundant but harmless. Add larger:5M to keep only the big ones.

How do I find all emails with attachments in Outlook?

In classic Outlook, type hasattachment:yes in the search box or select the Has Attachments button on the Search Tools ribbon. In new Outlook and Outlook on the web, run a search and select Files, check Attachments under Advanced Search, or choose Sort > Has files.

Why does messagesize:enormous not work in new Outlook?

Microsoft marks the named sizes (tiny, small, medium, large, verylarge, enormous) as not supported in new Outlook for Windows. Use the explicit form instead: messagesize:>5 MB.

How do I find attachments in a long Outlook thread?

Search the thread's subject together with the attachment operator, subject:"your subject" hasattachment:yes in classic Outlook, or the subject words plus the Files tab in new Outlook. Only the messages in that conversation that carry a file come back. Microsoft documents no thread-specific feature for this.

Can Gmail or Outlook search inside an attachment?

Not by operator. Both search references filter on the attachment's presence, name and type and the message's size, sender and date. A file stays findable only by the name the sender gave it, which is why filing attachments out of email, named by their contents, is the lasting fix.

Search once, then stop searching

The operators above find the message every time, and the file inside is named Scan_0043.pdf every time. Connect the inbox, run one Historical Sync, and let a workflow name and file the attachments by what they say. Start with a sample folder, or see how file workflows fit together first.

Share it with your network

You might also find useful