SortWerk

Gmail search like a pro: the search operators that really help

Filters and labelsReading time: 2 min

Search is Gmail's underrated tool. With a few commands you find any invoice, any attachment and any forgotten reply in seconds. The same commands also make filters more precise.

Brass magnifying glass on a fanned row of cream envelopes on a green felt desk mat
AI-generated image

Sender, recipient, subject

  • from:miller@example.com: emails from this sender
  • from:@example.com: all senders of this domain
  • to:info@yourcompany.com: to a specific address, useful with forwarding
  • subject:quote: «quote» in the subject
  • subject:"quote renovation": exactly this phrase in the subject

Attachments

  • has:attachment: emails with an attachment
  • filename:pdf: PDF attachments
  • filename:invoice: attachments whose name contains «invoice»
  • larger:10M: emails over 10 MB, good for freeing up space
  • has:drive has:document has:spreadsheet: links to Google Drive files

Time

  • newer_than:7d: newer than seven days (d days, m months, y years)
  • older_than:2y: older than two years
  • after:2026/01/01 before:2026/04/01: first quarter of 2026

Folders and state

  • label:invoices: with this label; for sublabels use a hyphen: label:clients-quotes
  • -label:invoices: without this label
  • has:nouserlabels: emails without a label of your own, so not yet filed
  • in:inbox, in:sent, in:spam, in:trash, in:anywhere (including spam and trash)
  • is:unread, is:starred, is:important
  • category:promotions: in the Promotions tab

Combining

  • invoice OR receipt: one of the two (OR in capitals)
  • invoice -advertising: with «invoice», without «advertising»
  • from:@shop.com (invoice OR order): brackets group
  • "final notice": exact phrase
  • {invoice receipt voucher}: curly brackets are a shorthand for OR

Saving searches and using them as filters

Gmail has no saved searches, but two ways lead there: save the address of the results page as a browser bookmark. Or turn the search into a filter: open search options, put the command into Has the words, then Create filter. That way «find receipts» becomes a label that fills itself. More in Create Gmail filters.

Read on

All articles