How to Find an Attachment in Gmail by File Type, Sender, or Date

Use copyable Gmail searches to find a PDF, spreadsheet, or shared Drive link even when you have forgotten the subject line.
Follow these steps at your own pace. Check product terms and prices directly with providers before purchasing.
Quick answer
Enter
filename:pdfin Gmail search to find messages with PDF attachments. Narrow the results with a sender or time window. If someone shared a Google Drive file, tryhas:driveor search for the document title instead.
Choose a search you can test
Paste one example into the Gmail search box and press Enter. Replace the example address and dates with your own. Leave the colon next to its value. Start with the clue you actually know, then add one condition at a time.
| What you remember | Example search |
|---|---|
| A PDF from one supplier | from:billing@example.com filename:pdf |
| An Excel workbook sent around March 2026 | filename:xlsx after:2026/02/28 before:2026/04/01 |
| The exact file name | filename:floor-plan.pdf |
| An attachment and words from the email | has:attachment "revised estimate" |
| A Google Sheet the sender shared | from:alex@example.com has:spreadsheet |
Work from the result to the right version
- Check the account. A search in your personal Gmail will miss the copy sent to your work address. Look at the profile menu if you use more than one mailbox.
- Open a matching conversation. Expand individual replies, including older collapsed ones. A result can be a long thread in which just one message carries the attachment.
- Match the file to its message. Compare the filename, sender, and message date. Two replies can both contain estimate.pdf. Open the preview and check the revision date or the line item you expected before saving a copy.
When an attachment search misses the file
The sender pasted a link. Clear has:attachment and filename:. Try has:drive for a shared Drive item. For a regular pasted link, search for the sender and a few words from the message. Opening a restricted Drive file may still require permission from its owner.
The date is uncertain. Widen the window by a day at either end, especially for late-night messages. Drop the sender if a colleague might have forwarded the file. If the email was archived, ordinary Gmail search can still find it. Use the archived email recovery guide if you also want it back in the inbox.
You search for the same receipts every month. Once you know which sender and subjects identify them, automatically label future receipts. Keep file type out of that rule if the merchant sometimes puts the receipt directly in the message.
Comments
Comments are reviewed before they become public.
Sign in with Google to leave a comment.
Sign in with GoogleNo approved comments yet. Be the first to start the discussion.