Gmail Filter
Fill in a form, get a Gmail search query — phrases that must appear together, alternatives joined by OR, plus sender, date and attachment filters — ready for the search box or a filter's “Has the words”.
Match any group
A message matches a group when it has every term in it, and the query when it matches any group.
Group 1 — all of these
Every match must also
Search in
Read state
Gmail search query
- • Add a term or a filter to build a query.
Instructions
Build a Gmail search from a form instead of by hand — the same text works in the search box and as a Gmail filter.
- Type a phrase into the first group. Add more terms to the group when all of them must be in the message.
- + Add OR group for an alternative: a message matching any one group is found.
- Narrow every match under Every match must also — sender, dates, attachment, where to look.
- Copy the query, or Open in Gmail to run it straight away.
Tips
- Exact (on by default) puts the words in quotes, so they must appear together and in that order. Off, the words can appear anywhere in the message. Gmail ignores case and most punctuation either way.
- Not excludes a term:
-"weekly digest". The field menu searches one part of the message —subject:,from:,label:,filename:… - To make it a filter: in Gmail, Settings → Filters and Blocked Addresses → Create a new filter, paste the query into Has the words, then pick what happens to the matches (label, archive, forward…).
- Gmail binds
ORtighter than a space, soa b OR cmeansa (b OR c). The page brackets each group and the whole OR chain for you. - Write AND only changes how the query reads — Gmail treats a space as AND. Open in Gmail uses your first signed-in account (
/u/0/). - Your form is kept in this browser and comes back on reload — nothing leaves the page to build a query.
- Hit Example, then click + Add OR group for phrase groups or the From box for a sender + attachment + date filter.