Guide
Gmail filters: how to create, edit, delete and fix them
A Gmail filter is a rule: when new mail matches these conditions, do this. This guide shows how to set one up, edit or delete it, the syntax filters understand, how to move mail to a “folder” automatically, what to check when a filter isn’t working, and where filters stop.
Read-only, about a minute. Nothing in your mailbox changes.
What a Gmail filter does
A filter has two halves. The conditions say which mail it matches: a sender, words in the subject or body, an attachment, a size. The actions say what Gmail does with a match: apply a label, skip the inbox, star it, mark it read, forward it, delete it, or put it in a category tab. Gmail runs every filter on each new email as it arrives, on the server, so it works on the web, on your phone and in any other mail app. Filters don’t touch mail you already have unless you ask when you create one.
How to set up a filter in Gmail
- Open the search options. In Gmail on the web, click the sliders icon at the right end of the search box.
- Fill in the conditions. From, To, Subject, “Has the words”, “Doesn’t have”, size and “Has attachment”. Use as few as you can; every extra condition means fewer matches. Click “Search” first to see what they catch.
- Click “Create filter”, at the bottom of the search options next to the Search button.
- Choose the actions. “Apply the label” (pick one or choose “New label”), “Skip the Inbox (Archive it)”, “Star it”, “Mark as read”, “Forward it to” (needs a verified forwarding address), “Delete it”, “Never send it to Spam” and “Categorize as”. You can tick several at once.
- Tick “Also apply filter to matching conversations” if you want the actions to run on mail you already have, then click “Create filter”.
The shortcut. Open any email, click the three-dot menu above it and choose “Filter messages like these”. Gmail opens the search options with the sender filled in, so a filter for one sender takes a few seconds.
How to edit or delete a Gmail filter
- Open your filters. Click the gear icon, “See all settings”, then the “Filters and Blocked Addresses” tab. Every filter is listed with its conditions and actions.
- Edit one. Click “edit” next to it. Change the conditions, click “Continue”, change the actions, then “Update filter”.
- Delete one. Click “delete” next to it and confirm. Mail it already labelled or archived stays as it is; only the rule goes.
- Export or import. Tick filters and click “Export” at the bottom of the list to download them as an XML file; “Import filters” loads that file into another account or restores a set you saved.
Deeper dives: apply a filter to existing emails, one filter for multiple senders, filter operators for dates, subjects and sizes and Gmail filters not working.
Gmail filter syntax
The form fields cover most filters. For anything more precise, type search operators into “Has the words”; a filter understands the same syntax as the search box.
| Operator | Matches |
|---|---|
from:billing@example.com |
A sender. from:example.com matches everyone at that domain. |
to:me |
Mail addressed to you directly, not to a list or in copy. |
subject:invoice |
A word in the subject. Quotes for a phrase: subject:"amount due". |
from:a@example.com OR from:b@example.com |
Either condition. OR must be capitals; {a b} means the same.
|
-unsubscribe |
Mail without the word. Works with any operator: -from:boss@example.com.
|
has:attachment |
Mail with an attachment. filename:pdf narrows it to a file type. |
larger:5M |
Mail over a size; smaller: is the opposite. |
list:news@example.com |
Mail sent through a mailing list, which catches newsletters that rotate senders. |
Two things catch people out. Gmail matches whole words, so invoice doesn’t match
“invoices”. And wildcards like *@example.com don’t work; use
from:example.com.
Automatically move Gmail mail to a folder
Gmail has no folders, only labels (labels vs folders explains), but a filter with two actions behaves exactly like “move to folder”.
- Create a filter for the sender or words, as above.
- Tick “Apply the label” and pick the label that will act as the folder.
- Tick “Skip the Inbox (Archive it)”. New matches never appear in your inbox or your notifications; they wait under the label in the sidebar, unread count and all.
Gmail filters not working: what to check
- The conditions are too narrow. A filter with a From address and a subject and a phrase needs all three. Search with the same conditions; if the search finds nothing, the filter will too.
-
The sender changed. Newsletters and shops often switch addresses. Check the
From address on a missed email and widen the filter to the domain, or use
list:. - Two filters disagree. Gmail runs every matching filter, not just the first, so an older filter that overlaps can archive or delete what the new one labels.
- It only runs on new mail. Edit the filter and tick “Also apply filter to matching conversations” to catch up on what arrived before.
- Forwarding isn’t verified. “Forward it to” only works once the receiving address has confirmed Gmail’s verification email, under “Forwarding and POP/IMAP”.
- You’re on a phone. The Gmail apps can’t create or edit full filters (the iPhone app can only add a simple sender-to-label rule in a label’s settings). Set the filter up in a browser once; it then runs everywhere.
Where filters stop
- Exact senders and words only. A receipt from a shop you’ve never used matches nothing, so it gets nothing.
- Words, not meaning. A filter for “invoice” labels a newsletter that mentions invoicing and misses an invoice that says “payment due”.
- Upkeep. Every new sender means another filter, and after a year nobody is sure what the list does.
Filters written for you
Syfft handles the two halves separately. After it sorts your 50 most recent emails, it suggests an inbox rule for each group of senders it labelled as Newsletters, Promotions, Automated updates, Receipts or Spam. You tick the ones you want; Syfft asks permission to change your mailbox settings and creates them as ordinary Gmail filters. Each labels new mail from that sender and, only if you choose, archives it under its label. They live in your Gmail settings, keep running without Syfft, and you can edit or delete them on the “Filters and Blocked Addresses” page like any other.
For what a filter can’t see, Syfft’s AI reads each new email and adds one of its labels, like Invoices, Deadline mentioned or Their turn, when it’s confident what the email is. The email stays in your inbox unless you turn Skip the inbox on for that label, unclear mail gets no label, and every label is logged and can be undone. Beyond that switch, rules are the only part of Syfft that moves mail. Outlook works the same way, with rules and categories.
Related guides
Questions about Gmail filters.
See all questionsCan I create a Gmail filter on my phone?
Not a full one. The Gmail apps can’t create or edit filters; the iPhone app can only add a simple sender-to-label rule in a label’s settings. Create the filter in a browser once and it runs on every device.
Do Gmail filters apply to emails I already have?
Only if you tick “Also apply filter to matching conversations” when you create or edit the filter. Otherwise a filter acts on mail from then on.
Does deleting a filter undo what it did?
No. Deleting a filter only stops it running. Mail it already labelled, archived or starred stays that way; change it by selecting the emails and editing them by hand.
Do the filters Syfft creates keep working if I disconnect it?
Yes. Syfft writes them as ordinary Gmail filters in your settings, where you can see, edit or delete them. They keep running whether or not Syfft is connected.
See what Syfft finds in your inbox.
Connect Gmail or Outlook and see the labels on your 50 most recent emails. Read-only, and it takes about a minute.