Skip to content
  1. Blog
  2. 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.

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.

  1. Open Gmail on a computer.
  2. In the search box at the top, click Show search options.
  3. 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.
  4. Click Search to preview. If something shows up that shouldn’t, tighten the criteria now.
  5. At the bottom of the search window, click Create filter.
  6. Tick the actions you want.
  7. Click Create filter to save.
Search options fieldSearch-bar operator
Fromfrom:james
Toto:me
Subjectsubject:invoice
Has the words"final invoice"
Doesn’t have-unsubscribe
Sizelarger:10M
Has attachmenthas:attachment
Each search option and its search-bar operatorSource: Gmail Help, “Create rules to filter your emails” and “Refine searches in Gmail”. Checked 12 November 2026.
Filter actionWhat it does
Skip the Inbox (Archive it)Moves it out of the inbox
Mark as readClears the unread state
Star itAdds a star
Apply the labelOne of your labels, one per filter
Forward itSends a copy to an address you’ve verified
Delete itMoves it to Trash
Never send it to SpamKeeps it out of Spam
Always mark it as importantAdds the importance marker
Never mark it as importantKeeps the marker off
Also apply filter to matching conversationsRuns it on mail you already have, except forwarding
Every action in the Create filter dialogSource: Gmail Help (answers 6579, 7190, 10957, 16457426), Google Workspace Learning Center, Gmail API filter guide. Checked 12 November 2026.

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:

  1. Tick the checkbox next to the email.
  2. Click More.
  3. Click Filter messages like these.
  4. Adjust the criteria Gmail fills in, usually just the sender.
  5. 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.

GoalSearch forActionsWatch for
1. NewslettersunsubscribeLabel, skip inbox once the preview is cleanSome real mail has the link too
2. Receiptscategory:purchasesLabel, mark readNeeds inbox categories turned on
3. One clientfrom:@client.coLabel, star, never SpamUse the client’s real domain
4. You’re on CCcc:you@you.coLabel onlyLeave it in the inbox
5. Big fileslarger:10MLabelPick your own cutoff
6. Invitesinvite.icsLabel onlySkipping the inbox hides invites you need to answer
7. VIPsfrom:james OR from:jacquiLabel, always importantUse full addresses if names clash
8. External-from:@you.coLabelA colleague’s forward counts as internal
Copy-ready filter recipesSource: Operators from Gmail Help, “Refine searches in Gmail”. Recipes 3, 6, 7 and 8 adapt Google Workspace Learning Center examples to the search bar.

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
Filter, label or neither

The last branch is where most of an inbox actually lives. We’ll come back to it.

RouteDecides bySpots urgent?Replies?
FilterSender, words, sizeOnly by sender or wordNo
Label by handYouYes, it’s youNo
Importance markersYour past habitsGuesses from habitNo
DemiThread, calendar, CRMRanks by what it costs youDrafts, you approve
Ways to handle Gmail, comparedSource: Gmail Help (including “Importance markers in Gmail”) and Google’s developer docs, checked 12 November 2026; Demi from demi.ai

Edit, delete, export and import filters

Every filter you make lives in one place:

  1. At the top right, click Settings, then See all settings.
  2. Open Filters and Blocked Addresses.
  3. 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:james labels 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.

Illustration: Kate's inbox after she fixes the CC filter

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.

DemiRanked

Kate'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

Waiting on you before anything leaves Gmail

Illustration: what Demi hands Kate at 9am

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.

Questions, answered

Does Gmail have rules?
Yes, Gmail calls them filters. Each one is a search plus actions, such as applying a label, archiving, starring, forwarding or deleting matching mail.
How do I create a rule in Gmail?
On a computer, click Show search options in the search bar, enter your criteria, click Create filter, choose the actions and click Create filter again.
Can I create Gmail filters on my phone?
Google documents filters for a computer only, with no Android or iPhone steps. Set them up on a computer and they sort your mail wherever you read it.
Do Gmail filters apply to emails I already have?
Not by default. When you create or edit a filter, tick the box to also apply it to matching conversations. Forwarding filters only ever affect new mail.
How many filters can I have in Gmail?
Up to 1,000, according to Google’s Gmail API documentation. Each filter can apply one of your own labels.
Why isn’t my Gmail filter working?
Common causes: replies that don’t match the criteria, two senders without OR between them, a category: filter with inbox categories off, a date operator, or another filter that archives or deletes the mail first.
Can I copy my Gmail filters to another account?
Yes. Export them as an .xml file from Filters and Blocked Addresses, then use Import filters in the other account.
Can a Gmail filter tell which emails need a reply?
No. Filters match on senders, recipients, words, size and attachments. Demi reads the thread with your calendar and CRM, ranks what needs you and drafts the reply for your approval.

Get work done, before it slips

Demi is the AI assistant for your Mac. It reads your inbox, calendar, calls and CRM, and has the next step drafted for your approval.

Get started for free

Free to start. You approve every consequential action.