Creating Advanced Gmail Filters
Accessing filters and advanced search
In the search field at the top of Gmail, click the options icon to display advanced search criteria. Once your criteria are set, the "Create filter" link at the bottom of the window turns that search into a permanent rule. You can also get there from settings: the gear icon, "See all settings", then the "Filters and Blocked Addresses" tab, which also lists every filter already active on the account.
Creating a filter step by step
- Type your criteria in the search bar, or open the advanced options via the dedicated icon
- Check the search results: that's exactly what the filter will capture
- Click "Create filter" at the bottom of the advanced search window
- Check one or more actions (label, archive, delete...)
- Check "Also apply filter to X matching conversations" to apply it retroactively to emails already received
- Confirm with "Create filter"
Useful search operators
| Operator | Example |
|---|---|
| from: | from:[email protected] |
| to: / cc: | cc:[email protected] |
| subject: | subject:invoice |
| has:attachment | emails with an attachment |
| filename: | filename:pdf |
| larger: / smaller: | larger:5M (large attachments) |
| older_than: / newer_than: | older_than:30d |
| is:unread / is:starred | is:unread |
| category: | category:promotions |
These operators combine: a space acts as an AND, OR as an OR, and a hyphen before a term as a NOT. Quotes around a phrase ("overdue invoice") require an exact match rather than just the presence of both words. For example, from:[email protected] has:attachment larger:5M isolates large files received from a specific client, in a single rule. The category: operator directly targets the Gmail tabs (Promotions, Social, Forums, Updates): combined with an archive action, it clears these tabs without going through the main inbox.
Available actions
A filter can combine several actions at once instead of just picking one:
- Apply a label
- Archive directly, without going through the main inbox
- Mark as read, or conversely never send it to spam
- Always mark it as important, or conversely never
- Delete directly
- Forward to another address (previously authorized)
Nested filters and labels
A label can be nested under another one (the "Nest label under" option when creating it), to get a hierarchy like "Clients/Billing" or "Clients/Quotes" instead of a flat list of separate labels. A filter can target this nested label directly like any other: useful as soon as several filters cover sub-categories of the same theme.
6 ready-to-copy filters
- Newsletters:
unsubscribein the body → label "Newsletters" + archive - Invoices:
subject:(invoice OR facture)→ label "Billing" - CC'd:
cc:[email protected] -to:[email protected]→ label "CC'd" - VIP senders:
from:(client1 OR client2)→ mark as important - Large attachments:
has:attachment larger:10M→ label "To archive" - Automatic notifications:
from:(noreply OR no-reply)→ label "Automatic" + mark as read
Common mistakes when creating a filter
- A criterion that's too broad: filtering an entire domain when only one sender is a problem also catches legitimate emails from the same domain
- Forgetting emails already received: without the "Also apply filter to X matching conversations" box, the filter only covers future emails
- Combining an imprecise criterion with the Delete action: always check the search results before confirming this type of filter, since there's no easy way back
- Stacking filters without reviewing them: the "Filters and Blocked Addresses" tab lists every active filter, worth going through periodically to remove the ones that are no longer useful
- Confusing blocking a sender with filtering it: blocking systematically sends to spam, which can make you miss a legitimate message from an otherwise unwanted sender; a filter stays more nuanced (archive, label, without necessarily deleting)
By profile: which filters to set up first
A freelancer managing quotes, invoices and outreach in a single inbox gets the most value from a "Billing" filter and a "CC'd" filter: these are the two categories that blend most easily into the rest (see MyCleark for freelancers). In a small team, each team member sets up their own filters on their own Gmail inbox, with no centralized setup or special IT rights (see MyCleark for small businesses).
Exporting and backing up your filters
In the "Filters and Blocked Addresses" tab, select one or more filters and click "Export": Gmail generates a downloadable XML file containing the chosen rules. This file can then be re-imported via "Import filters" on another Gmail account, or used as a backup before editing a complex rule.
The limits of filters
A filter applies a fixed rule: it doesn't understand an email's content and doesn't adapt to a new sender that wasn't anticipated when it was created. These limits are covered in detail in Gmail filters vs AI sorting.
When to switch to AI sorting
A few signs indicate that filters alone are no longer enough: creating a new filter almost every week for a new sender, finding an important email filed under a secondary label because no rule was set up for it, or noticing that two filters contradict each other without it being easy to tell which one ran first. In these cases, automatic AI sorting picks up the same principle as filters without ongoing manual setup: it reads the actual content of each email to decide where to file it, including for a sender it has never seen. It fits naturally into a 4D routine to automate Delete and Delegate.
Frequently asked questions
Does a Gmail filter apply to emails already received?
Only if you check "Also apply filter to X matching conversations" when you create it. Without that box, the filter only applies to emails received after it's created.
Can I test a filter before turning it on?
Yes, just run the matching search in the Gmail search bar: the results shown are exactly what the filter will capture once created.
How many filters can I create before it becomes unmanageable?
Technically, several dozen filters can coexist without any problem. The real limit is human: beyond about fifteen active rules, knowing which one applies and in what order becomes hard to track manually.
Do filters created on a computer also apply on mobile?
Yes. A filter is saved at the account level, not the device: it applies the same way on the mobile app, the web version and any other client connected to the account.
Can a filter forward an email to another address?
Yes, via the "Forward to" action, provided you've already authorized the destination address in Gmail's forwarding settings.
This article is part of our complete guide to managing your Gmail inbox. For sorting that goes beyond fixed rules, MyCleark offers automatic AI sorting. Discover MyCleark's pricing, from €5.99/month per inbox.