Guide

How to search email and files together

The file you need was either attached to an email, linked from an email, or saved to Drive after someone mentioned it in an email. Searching in only one place is how you end up asking a colleague to resend it.

By the Synced team · Updated

In short

To search email and files together in Google Workspace, use Gmail operators like has:drive, has:attachment, and filename: to find files shared by email, then run the same terms in Google Drive, or ask Gemini in Gmail with Drive files as sources. In Microsoft 365, search in Outlook with hasattachments:yes and use Search in the Microsoft 365 Copilot app to see files, people, and messages in one results page. Neither suite searches the other's files, so mixed setups still need two searches.

Start with what you remember about the file

People rarely remember a file name. They remember who sent it, roughly when, and what it was for. Build the search around those, and use the file type to cut the noise. "The pricing deck Sam sent before the offsite" becomes: from Sam, a presentation, in the last two months.

In Google Workspace: Gmail first, then Drive

Gmail search can find emails that carry a file, whether it's attached or shared as a Drive link. Type these straight into the search bar.

OperatorWhat it findsExample
has:attachmentEmails with an attached filefrom:sam has:attachment
has:driveEmails with a Google Drive file linked or attachedhas:drive subject:pricing
filename:Attachments by name or file typefilename:pdf invoice
newer_than: / older_than:A time window, like 2m for two monthshas:attachment newer_than:2m
after: / before:A date rangeafter:2026/07/01 before:2026/08/01
in:anywhereEverything, including Spam and Trashin:anywhere filename:contract
OR and -Either term, or exclude a termfilename:pptx OR filename:pdf -newsletter

From Google's list of Gmail search operators. Combine as many as you need.

If the email links a Drive file you can't find, or the file was edited after it was sent, switch to Google Drive. Drive's search box accepts the same keywords and adds filter chips for File type, People, and Date modified. It also supports operators such as owner: and type:.

Ask Gemini to look across both

On an eligible Google Workspace or Google AI plan, click Ask Gemini at the top right of Gmail. You can ask about earlier emails, and add Drive files as sources by clicking Add from Drive or typing @ and picking a file. A prompt like "What did the Q3 pricing doc say about annual discounts, and who sent it?" can pull from both. Check the answer against the source before you forward it.

  1. 1
    Search Outlook for emails with files

    Click the search box and type hasattachments:yes to list messages with attachments. Narrow it with from: and subject:, joined with AND or OR, for example from:Jerri AND subject:report. After a search, the Refine options let you filter by From, Subject, and Has attachments.

  2. 2
    Search files and messages in one place

    With a work or school account, open the Microsoft 365 Copilot app and select Search in the navigation pane. Results come from across your organization's content, and you can filter to files, people, meetings, chats, and more.

  3. 3
    Open the file where it lives

    A file that was attached in Outlook may since have been saved to OneDrive or SharePoint and edited. Open the latest copy from there instead of the attachment.

When your email and files live in different suites

Plenty of people use Gmail with OneDrive, or Outlook with Google Drive. Neither Google's nor Microsoft's search covers the other's storage, so the practical method is two searches with the same terms:

  1. Search email for the sender and a rough date. Note the exact file name from the attachment or link.
  2. Search the other storage for that exact name. Exact names beat keywords every time.
  3. If nothing matches, search storage for files modified within a day or two of the email's date.
  4. Once found, reply to the original thread with a link so the next search finds it in one place.

If the file you're after was an attachment on a very old message, the guide on finding an old email attachment goes deeper on that case.

Comparing ways to search across email and files

MethodCoversPlain-language questionsCost
Gmail operators plus Drive searchGmail and Google Drive, separatelyNoFree
Gemini in Gmail with Drive sourcesGmail and Drive togetherYesEligible Workspace or Google AI plan
Outlook search plus Microsoft 365 searchOutlook, OneDrive, SharePoint, TeamsKeyword searchNeeds a Microsoft 365 work or school account
AI inbox assistant (Synced)Connected Google Drive and OneDrive, plus the threadSearches when a message needs a fileFree plan covers Gmail, Drive, and OneDrive; Pro ($29.99/user/month) adds the rest

How Synced searches when a message asks for a file

Synced doesn't wait for you to search. When a new message asks for a document, it uses the thread for context, searches your connected Google Drive or OneDrive, finds the likely file, and attaches it to a draft reply. That works across suites, so a Gmail request can be answered from OneDrive. The request is written in plain words, and Synced works out what to look for, which is close to how natural language search works.

S
Sam (sales lead)
Gmail5:06 PM
Do you still have the pricing deck from before the offsite? Client wants the annual tiers.
2 Tasks Ready for Approval
Found Pricing_2026_offsite.pptx in OneDrive, last edited Aug 28
Drafted a reply with the deck attached and the annual tiers called out
Pricing_2026_offsite.pptx

An illustration. You check the file and approve the reply before it's sent.

Synced doesn't search your whole mailbox history, so for an old email itself, use the Gmail or Outlook search steps above. Dropbox and Notion are listed as coming soon, so files stored there won't be found yet. Synced connects to Drive read-only for search; see Google Drive for the permissions it asks for.

Questions

Frequently asked.

How do I find emails with Google Drive links in Gmail?

Type has:drive in the Gmail search bar. Add from: with the sender's name or a keyword to narrow it, for example has:drive from:sam budget.

Can Gmail search inside attachments?

Gmail's filename: operator matches attachment names and file types. For text inside a document, search Google Drive, which indexes file contents, or ask Gemini in Gmail with the file added as a source.

Can I search Gmail and OneDrive at the same time?

Not with Google's or Microsoft's built-in search. You need two searches, or a third-party tool that connects to both accounts.

What does the in:anywhere operator do in Gmail?

It widens a search to all of Gmail, including Spam and Trash. Use it when a file you know you received doesn't show up in a normal search.

Get started

Get early access to Synced.

Join the private beta. Synced drafts the replies, finds the files, and proposes the meeting times. You approve.

Get Early AccessFree plan. No credit card.