Gmail Filters: A Step-by-Step Guide With 12 Useful Examples
How to create, test and edit Gmail filters on a computer, the search operators that make them precise, and 12 ready-made filters to copy.

Gmail filters are saved searches with actions attached: every new message that matches the search is labeled, archived, starred, forwarded or deleted before you see it. Google’s Gmail Help describes building them on a computer, either from the search box or from a message already in your inbox.1 A filter that catches the right mail and nothing else comes from the same five moves, in this order:
- Build a search that finds the mail
- Test the search before you save it
- Click Create filter and choose the actions
- Decide whether to apply it to mail you already have
- Edit, back up and review your filters
To decide which mail deserves a filter in the first place, read how email filters and rules sort an inbox, which also compares Gmail with Outlook. A filter is the simplest case of the trigger-and-action pattern in workflow automation for beginners. Menu names below are from Gmail’s English interface on the web.
How do I create a filter in Gmail?
To create a Gmail filter on a computer, open Gmail, open the search bar’s Show search options panel, enter your criteria, click Create filter, tick the actions you want and click Create filter again, according to Google’s Gmail Help. A second route starts from a message: tick its box, open the More menu and choose Filter messages like these.1
Both routes end on the same two screens: one that describes the mail and one that says what happens to it. Getting the first screen right matters more, because every action you tick later applies to whatever that description catches.
1. Build a search that finds the mail
The search options panel has fields such as From and Subject; type an address into From and the filter will act on mail from that sender.2 Any query written in Gmail’s search syntax also works as a filter, Google’s developer guide says, so you can type operators straight into the search box instead of using the fields.3
That is also how to filter emails by sender in Gmail. Put the full address in From for one sender, or the @ sign followed by the company’s domain, such as @example.com, to catch everyone who writes from that domain, as a How-To Geek guide describes.4 A weekly sales report from reports@example.com needs nothing more than that one field.
2. Test the search before you save it
Google’s help suggests running the search first, with the Search button, and only then choosing Create filter. Read the results: they are the existing messages your filter would act on.1 A search for the word “invoice” in the subject will find suppliers’ invoices, and also the client asking why an invoice is late. Narrowing the search to your suppliers’ addresses keeps the client’s question out of the filter.
One detail of Gmail’s search can surprise you. Gmail matches individual messages, so a search that excludes something can still show a whole conversation if one message in it qualifies.5
3. Click Create filter and choose the actions
The second screen is a list of tick boxes. Keio University’s Gmail guide lists them as skipping the inbox (archiving), marking as read, starring, applying a label, forwarding, deleting, keeping out of spam, marking as important or not, and applying an inbox category, and you can tick several at once.2 Google’s developer guide sets one limit on that list: a filter can apply only one of your own labels.3
For most automated mail, the pair to tick is Apply the label plus Skip the Inbox. The message never interrupts you, yet it is one click away under its label in the sidebar.
4. Decide whether to apply it to mail you already have
Can Gmail filters apply to existing emails? Yes: when you create a filter, a box offers to apply it to the matching conversations already in your mail, Keio University’s guide says; leave it unticked and only new mail is touched.2 Forwarding is the exception: Google’s help says a filter that forwards mail affects only new messages.1
- Myth
- A new Gmail filter only ever sorts mail that arrives after you make it.
- Fact
- A tick box applies a new filter to matching conversations you already have. Forwarding is the exception: it affects only new messages.
Tick the box for labels and archiving, which tidy old mail and lose nothing. Leave it unticked if the filter deletes, because hundreds of old messages can go to the trash at once.
5. Edit, back up and review your filters
To edit or delete a filter, open Settings, choose See all settings and go to the Filters and Blocked Addresses tab. The same page has Export, which saves the filters you tick as an .xml file you can open in a text editor, and Import filters, which loads such a file back into Gmail.1 Export before a big cleanup or before moving to a new Google account.
Google’s developer documentation caps the number of filters at 1,000 per account; the Gmail Help pages we checked do not mention a limit.6 Long before that point, old filters for senders who stopped writing make the list hard to read, so step 5 ends with a review, described below.
Can you create Gmail filters on the mobile app?
Not according to Google’s help pages, checked on 7 November 2026. Gmail Help gives filter steps only for a computer, and the Android and iPhone versions of the page show the same computer steps.1 The Android help for labels, by contrast, describes applying, moving and creating labels inside the Gmail app.7
Google’s developer documentation describes filters as rules set for the account that act on each incoming message, so a filter made on a laptop keeps sorting new mail whatever device you read it on, and its labels show up in the app.3 A delivery notice that slipped past your Receipts filter can still get its label in the app; fixing the filter’s search waits until you are at a computer. So build and edit filters on a laptop or desktop, and use the phone for the odd stray message.
Search operators that make Gmail filters precise
Gmail’s search operators are short words and symbols, such as from:, list: and a minus sign, that narrow a search, and Google’s help says they can be combined.5 Because a filter is a search, they decide how precise it is, and six groups of them do most of the work.
| Operator | What it matches | Example |
|---|---|---|
from: and to: |
A sender or recipient; to:me means mail sent to you |
from:amy@example.com5 |
subject: |
A word or phrase in the subject line | subject:invoice5 |
has:attachment, filename: and larger: |
Any attachment; an attachment’s name or file type; messages above a size | filename:pdf, larger:10M5 |
list: |
Mail sent from a mailing list | list:info@example.com5 |
category: |
An inbox tab, but only if you use inbox categories | category:social5 |
-, OR, " " and ( ) |
Leaves out a term; either of two conditions; an exact phrase; a group of terms | dinner -movie, from:amy OR from:david, subject:(dinner movie)5 |
Quotes and the minus sign do the most to tighten a filter. A filter on the bare word invoice matches it anywhere in a message; subject:"invoice attached" matches only that phrase in the subject. A minus sign carves out exceptions, such as a sender’s security notices inside a filter that archives the rest of their mail. Add one operator at a time and run the search after each, so you can see which term removed which messages.
12 Gmail filters you can copy
The twelve filters below are built from the operators in the table; replace the example addresses with your own and run each search before saving it. Most pair a label with Skip the Inbox so nothing is lost, and the calendar search comes from Google’s own help.
- Newsletters. Search
from:(news@example.com OR digest@example.org); apply the label Reading and Skip the Inbox. - A mailing list. Search
list:announce@example.com; apply the label Lists and Skip the Inbox. - Receipts. Search
subject:(receipt OR invoice OR "order confirmation"); apply the label Receipts and Skip the Inbox. - Routine calendar replies. Search
header:X-Google-Calendar-Notification:rsvpAccepted OR header:X-Google-Calendar-Notification:rsvpTentative; Skip the Inbox. - Invites from other calendars. Search
filename:ics; apply the label Invites. - Automated alerts. Search
from:(noreply OR no-reply) -subject:(security OR password); apply the label Alerts, Skip the Inbox and Mark as read. - Your manager. Search
from:manager@yourcompany.com; Star it and Always mark as important. - Mail addressed to you. Search
to:me; Always mark as important. - Large attachments. Search
larger:10M; apply the label Large files, which makes them easy to find when storage runs short. - A project. Search
"Project Atlas" OR from:@clientco.com; apply the label Atlas and leave the mail in the inbox. - Social notifications. Search
category:social; Skip the Inbox and Mark as read. - A trusted sender. Search
from:school@example.org; Never send it to Spam.
- Search: describe the mail with fields or operators such as from:, list: or subject:
- Test: click Search and read the results, looking for anything the filter should leave alone
- Act: tick the actions, usually Apply the label and Skip the Inbox, then Create filter
The calendar filter (4) uses a hidden header that Google Calendar adds to its emails; Google’s Calendar Help lists one search token per kind of notice, from new invitations to declined room bookings, and suggests archiving routine replies while labeling declines that carry a note.8 It works only for mail sent by Google Calendar. Filter 5 is our own suggestion for other calendar systems: if their invitations arrive with an .ics calendar file attached, a filename search catches them, though it may also catch booking confirmations that carry one, so test it first.
The alerts filter (6) leaves out security and password mail on purpose, our own precaution: a sign-in warning can come from a no-reply address too, and it is automated mail you should see at once. Filter 8 has a limit of its own: to:me matches any message with you on the To line, including ones sent to several people, and none of the documented operators tests for mail sent to you alone.5
The filter for social notifications (11) needs inbox categories switched on, as the operator table notes. Filter 12 follows Google’s own advice for a sender whose mail keeps landing in spam: put the address in From and tick Never send it to Spam.9
A forwarding filter for a shared account
To pass one kind of mail on, say invoices arriving at a team address, to someone else, use a search such as subject:invoice has:attachment with Forward it. Google’s help says you must first add the forwarding address under Settings, Forwarding and POP/IMAP, and confirm it from a link sent to that address; Gmail then shows a reminder for the first week. Make one filter for each address you forward to.10
Label and skip the inbox, then check after a month
A label keeps a filtered message searchable, while a deleting filter sends it to the trash, where Google’s help says messages are permanently deleted after 30 days. So route mail with a label and Skip the Inbox, and keep deleting for senders you have checked for a few weeks. Google’s own checklist for missing mail tells you to look for filters that delete or skip the inbox.11
The second habit, a review after a month, fits a 2019 study of how people write email rules. Researchers at MIT found that many rules their participants wanted were already possible in their usual email client, and some participants found such rules hard to get right.
The study
Limited evidence
Why people skip rules their mail app supports: an MIT need-finding study, 2019
Twelve engineering students wrote small rules for their own inboxes on a platform the team built, then were interviewed. More than half of their rules could already have been built in their usual email client. Asked why they had not done it, some said proper rules were hard to write; one described a sender-and-mark-as-read rule that did not always work. The authors concluded that people need better ways to debug and test automations.12
The sample is small and unusually technical, and the students were writing code, not Gmail filters, so it says more about rule-writing in general than about Gmail. Still, the trouble participants described was a rule that did not behave as intended, and testing with Search and a later check are there to catch that.
A month after you set up your filters, open each label once and scan for mail that should have reached you, such as a colleague’s question caught by a receipts filter. Then open Filters and Blocked Addresses, remove the filters for senders who have stopped writing, and export the rest as a backup.
Your first Gmail filters
The bottom line
Gmail filters work best as labels with Skip the Inbox, built at a computer from a search whose results you have read. Pick the two or three senders that interrupt you most, copy the matching filters from the list, and set a reminder to open each label in a month.
Frequently asked questions
Why is my Gmail filter not catching some messages?
Usually the search does not match them. Google's Gmail Help says a reply to a filtered message is filtered only if the reply meets the same criteria, and a filter acts only on new mail unless you tick the box to apply it to existing conversations. Run the filter's search again, open a message it missed, and compare its sender, subject and wording with what the search asks for.
Can one Gmail filter add two labels?
Not according to Google's developer guide for Gmail filters, which says only one user-defined label is allowed per filter. To give the same mail two labels, create two filters with the same search, each applying one label. Other actions, such as starring, marking as read and skipping the inbox, can be combined in a single filter.
Can a filter move mail into one of Gmail's inbox tabs?
Yes. The action list in Gmail's filter screen includes a category option, as Keio University's Gmail guide shows, so a filter can send a sender's mail to a tab such as Updates instead of a label. Google's search help notes that category searches work only if you use inbox categories, so switch the tabs on first.
Sources
- Create rules to filter your emails. Google (2026). Gmail Help, checked 7 November 2026
- Automatically sort emails using filters. Shonan Fujisawa Information Technology Center, Keio University (2021). Gmail user manual, last modified 27 October 2021
- Manage Gmail filters. Google (2026). Google for Developers, Gmail API guide, checked 7 November 2026
- How to Block a Domain in Gmail. Writtenhouse, S. (2022). How-To Geek, 13 September 2022
- Refine searches in Gmail. Google (2026). Gmail Help, checked 7 November 2026
- Method: users.settings.filters.create. Google (2026). Google for Developers, Gmail API reference, checked 7 November 2026
- Create & manage labels in Gmail (Android). Google (2026). Gmail Help, Android version, checked 7 November 2026
- Filter & organize Calendar notifications in Gmail. Google (2026). Google Calendar Help, checked 7 November 2026
- Fix issues with valid emails in Spam. Google (2026). Gmail Help, checked 7 November 2026
- Automatically forward Gmail messages to another account. Google (2026). Gmail Help, checked 7 November 2026
- Gmail messages are missing. Google (2026). Gmail Help, checked 7 November 2026
- Opportunities for Automating Email Processing: A Need-Finding Study. Park, S., Zhang, A. X., Murray, L. S. & Karger, D. R. (2019). Proceedings of CHI 2019, paper 374
How we researched this
We read Google's Gmail Help and Google Calendar Help pages on filters, search operators, labels, forwarding, spam and missing mail, and Google's developer documentation for the Gmail filter settings, all checked on 7 November 2026, plus one university IT guide and one How-To Geek guide. For research on how people write email rules, we searched OpenAlex and read a 2019 CHI study in full. Limitation: Gmail's menus change, and we could not view the filter screen itself, so wording may differ from yours.



