- Blog
- Guides
How to create rules in Gmail (Gmail calls them filters)
How to create rules in Gmail with filters: the desktop steps, 8 copy-ready recipes, applying them to old mail, the 1,000 limit and why filters fail.
On this page11 sections
Short answer: on a computer, click Show search options in Gmail’s search bar, enter who or what to match, and click Create filter. Tick the actions you want (label, archive, star, forward and so on), then click Create filter again. The rule runs on new mail from then on.
Take Kate, who runs a six-person design studio and gets about 140 emails a day. Say she spends an afternoon writing filters. Newsletters go to a Reading label. Receipts go to Finance. Anything she’s only CC’d on skips the inbox.
For a month it works. Then a client, James, asks her a direct question about an invoice date, in a thread where she’s on CC. The filter does exactly what she told it to, and the question sits in the archive until James chases it.
This guide covers both halves: how to create rules in Gmail that do what you mean, and where filters stop. We make Demi, an AI assistant that works on the mail filters leave behind, so the last two sections say where it helps and when a couple of filters is plenty. Every Gmail step below was checked against Gmail Help and Google’s developer docs on 12 November 2026.
How to create rules in Gmail from the search bar
This is the route Google documents first. Use it most of the time, because you see what the rule will catch before you save it.
- Open Gmail on a computer.
- In the search box at the top, click Show search options.
- Fill in what to match: From, To, Subject, Has the words, Doesn’t have, size, or the attachment box. The table below shows the search-bar operator each field equals.
- Click Search to preview. If something shows up that shouldn’t, tighten the criteria now.
- At the bottom of the search window, click Create filter.
- Tick the actions you want.
- Click Create filter to save.
| Search options field | Search-bar operator |
|---|---|
| From | from:james |
| To | to:me |
| Subject | subject:invoice |
| Has the words | "final invoice" |
| Doesn’t have | -unsubscribe |
| Size | larger:10M |
| Has attachment | has:attachment |
| Filter action | What it does |
|---|---|
| Skip the Inbox (Archive it) | Moves it out of the inbox |
| Mark as read | Clears the unread state |
| Star it | Adds a star |
| Apply the label | One of your labels, one per filter |
| Forward it | Sends a copy to an address you’ve verified |
| Delete it | Moves it to Trash |
| Never send it to Spam | Keeps it out of Spam |
| Always mark it as important | Adds the importance marker |
| Never mark it as important | Keeps the marker off |
| Also apply filter to matching conversations | Runs it on mail you already have, except forwarding |
The search-bar column is the useful trick. Type operators straight into the search bar, press Enter, and check the results. Google’s own tip: after you search, you can use the results to set up a filter. The preview is the whole point.
How to create rules in Gmail from a message
If the email you want to sort is already in front of you:
- Tick the checkbox next to the email.
- Click More.
- Click Filter messages like these.
- Adjust the criteria Gmail fills in, usually just the sender.
- Click Create filter, choose the actions, and save.
It’s the fastest way to deal with one noisy sender. It’s also the easiest way to write a filter that’s too broad, because Gmail guesses the criteria for you. Check them.
Three rules that decide whether a filter catches anything
Google’s developer docs spell out how filters behave, and these three trip people up most:
- Every criterion has to match. A filter with a From and a Subject only catches mail that has both. For “either”, write
OR. - One label per filter. Want mail tagged Client and Invoices? Make two filters.
- Filters act on messages, not threads. One matching message gets the label. The rest of the conversation doesn’t.
8 Gmail filter recipes you can copy
The quickest way to learn how to create rules in Gmail is to copy a few that work. Each query below uses Google’s documented operators or a plain keyword, written the way Google’s help pages write them. Paste the query into the search bar, press Enter, check the results, then create the filter.
| Goal | Search for | Actions | Watch for |
|---|---|---|---|
| 1. Newsletters | unsubscribe | Label, skip inbox once the preview is clean | Some real mail has the link too |
| 2. Receipts | category:purchases | Label, mark read | Needs inbox categories turned on |
| 3. One client | from:@client.co | Label, star, never Spam | Use the client’s real domain |
| 4. You’re on CC | cc:you@you.co | Label only | Leave it in the inbox |
| 5. Big files | larger:10M | Label | Pick your own cutoff |
| 6. Invites | invite.ics | Label only | Skipping the inbox hides invites you need to answer |
| 7. VIPs | from:james OR from:jacqui | Label, always important | Use full addresses if names clash |
| 8. External | -from:@you.co | Label | A colleague’s forward counts as internal |
Recipe 1 is blunt but effective: almost every newsletter carries the word, and the preview shows you the false positives before you let it skip the inbox. For one newsletter, list:news@example.com catches that mailing list exactly. Recipe 2 relies on Gmail’s inbox categories. If you’ve switched them off, subject:receipt does a similar job. Recipe 4 is Kate’s fix: her CC filter should have labeled the mail and left it in the inbox.
Should it be a filter, a label or neither?
Not every annoyance deserves a rule. A filter that hides the wrong thing costs more than ten minutes of sorting by hand.
What's the mail like?
- Same sender, never needs youFilter: archive and labelNewsletters, receipts, notifications
- Same sender, sometimes needs youFilter: label onlyIt stays in the inbox, so you still see it
- A one-off you want to find laterLabel it by handNo rule needed
- Needs a reply, from anyone
Can a sender or a word tell you it's urgent?
- Yes, alwaysA VIP filterLabel and mark important
- No, it depends on what they askedNeitherThis is reading, not sorting
The last branch is where most of an inbox actually lives. We’ll come back to it.
| Route | Decides by | Spots urgent? | Replies? |
|---|---|---|---|
| Filter | Sender, words, size | Only by sender or word | No |
| Label by hand | You | Yes, it’s you | No |
| Importance markers | Your past habits | Guesses from habit | No |
| Demi | Thread, calendar, CRM | Ranks by what it costs you | Drafts, you approve |
Edit, delete, export and import filters
Every filter you make lives in one place:
- At the top right, click Settings, then See all settings.
- Open Filters and Blocked Addresses.
- Find the filter. Click Edit to change it (then Continue and Update filter), or Delete to remove it.
Export. On the same page, tick the filters you want and click Export at the bottom. You get an .xml file you can open in a text editor, which is handy for bulk edits: change a domain in ten filters with find and replace instead of ten dialogs.
Import. Click Import filters at the bottom, choose the file, click Open file, then Create filters. That’s how you copy a good setup from a personal account to a work one, or restore one after a cleanup goes wrong.
One habit worth starting now: name each filter’s label after what the rule does, like “Auto: receipts”. A year from now, when mail goes missing, you’ll know which rule moved it.
Applying a filter to mail you already have
A filter acts on mail that arrives after you save it. When you create or edit one, the dialog’s last checkbox also applies it to conversations that already match. Tick it and the actions run on your existing mail too. Before you do, scroll through the search results once more. If the old mail it’s about to archive or delete includes anything you care about, narrow the search or leave the box empty.
One exception, from Gmail Help: a filter that forwards messages only affects new messages. Ticking the box won’t send your back catalogue anywhere.
Why you can’t create filters in the Gmail app
Gmail Help’s filter page starts with “On your computer” and has no Android or iPhone tab, though its pages on missing mail and on spam both do. Google doesn’t document a way to make or edit filters in the Gmail mobile apps. So if you’re reading this on your phone, the honest answer is: later, at a computer.
The upside: filters run on incoming mail in your account, not in the app. A filter you make on your laptop sorts mail before you open the app on your phone.
Limits, and why a Gmail filter doesn’t work
Making a filter is half the job. The other half is knowing why one quietly fails. Google’s developer docs cap you at 1,000 filters per account, and few people get near it. They hit these instead:
- Replies slip through. Gmail Help says a reply to a filtered message is only filtered if the reply itself matches. A filter on
from:jameslabels his email, but Jacqui’s reply in the same thread arrives unlabeled. - Two senders, no
OR. Every criterion must match, so neither sender does. - Forwarding needs a verified address. Gmail sends a verification link first, and one filter forwards to one address. For two addresses, make two filters.
category:needs inbox categories. Switch them off and those filters stop matching.- Date operators fight filters. New mail is never
older_than:1y, so a filter built on it won’t catch anything as it arrives. - Another filter got there first. If mail is vanishing, Gmail Help’s advice is to look for filters that say “Delete it” or “Skip Inbox”.
What filters can’t do
Say Kate fixes her CC filter so it labels and leaves the mail in her inbox. James’s question reaches her now. So do his weekly status updates, the client’s other threads and about 130 more emails, all sorted and labeled, none of them ranked.
Each filter answered a question about the envelope: who sent this, who else got it, what’s in the subject. None of them can answer the one she cares about every morning: which of these needs me today? A VIP filter on James would flag every status update he sends, not the one that asks for something. And “quick question” might be urgent or might be nothing.
| From | Filter did | Needs Kate? |
|---|---|---|
| Design Weekly | Reading, archived | No |
| Paper Supply Co | Finance label | No |
| James, status | Client label | No |
| James, question | Client label | Yes: invoice date |
| Jacqui | Client label | Yes: follow up |
| Chris | Nothing matched | Yes: wants times |
Same sender, same label as his status update. Only reading it tells you it asks Kate a question.
Use filters to clear the noise. Just don’t expect a rule about envelopes to read the letter.
Where Demi fits
Demi is an AI assistant for your Mac, and it picks up where Kate’s filters stop. She connects Gmail once, keeps the account she already has, and writes no rules.
Demi reads each thread with the calendar entry and CRM record behind it, so it can tell what she owes from what can wait. James’s question about the invoice date moves above his status updates, with a reply in her drafts folder, written in her voice. When Chris asks to talk next week, the draft offers times that fit the day she actually has. More on the Gmail assistant page.
DemiRankedKate's Gmail, reordered
- JamesInvoice dateReply drafted with the date
- Jacqui, proposalNo replyFollow-up drafted
- ChrisTimesReply drafted with three times
- James's status updateNo deadlineMoved down
Nothing sends until you approve it
Demi doesn’t send or delete Gmail messages. It prepares drafts, and you approve, edit or skip each one. Keep your filters: they clear the noise, and Demi works on what’s left. For the same thing across Gmail and Outlook, see how Demi handles email end to end, and for threads that went quiet, follow-ups drafted for you.
Demi has a free plan, no card required.
When you don’t need any of this
If you get thirty emails a day, mostly from people you know, you don’t need Demi, and you may not need more than two or three filters. A newsletter rule and a receipts rule will do most of the work. Filters pay off once the noise starts hiding the mail that matters. An assistant pays off once the mail that matters is too much to read first thing, every day.