How to Create a Rule in Gmail (Filters Explained)
Gmail's inbox can get overwhelming fast — newsletters, work emails, receipts, alerts, and spam all competing for the same space. Gmail rules, officially called filters, let you automate what happens to incoming messages based on conditions you set. Understanding how they work — and what shapes their usefulness — helps you decide how far to take them.
What Is a Gmail Filter?
A Gmail filter is a set of instructions that tells Gmail: "When an email matches these conditions, do this automatically."
Every filter has two parts:
- Criteria — what to look for (sender, subject, keywords, size, etc.)
- Actions — what to do when a match is found (label it, archive it, delete it, mark it as read, forward it, etc.)
Filters run automatically on incoming mail. Once set up, they require no manual input.
How to Create a Filter in Gmail 📋
There are two main paths to creating a filter.
Method 1: From the Search Bar
- Open Gmail in a browser (desktop)
- Click the search options arrow on the right side of the search bar
- Fill in your criteria — From, To, Subject, keywords, date range, size, or whether it has an attachment
- Click "Create filter" at the bottom of the search panel
- Choose one or more actions from the list
- Click "Create filter" to save
Method 2: From an Existing Email
- Open the email you want to base a rule on
- Click the three-dot menu (More options) in the email toolbar
- Select "Filter messages like these"
- Gmail pre-fills the criteria based on that email (usually the sender)
- Adjust the criteria if needed, then click "Create filter"
- Choose your actions and save
Both methods reach the same filter creation screen — the second just gives you a head start.
Available Filter Criteria
| Criteria Field | What It Matches |
|---|---|
| From | Sender's email address or domain |
| To | Recipient address (useful for aliases) |
| Subject | Words in the subject line |
| Has the words | Any word anywhere in the email |
| Doesn't have | Excludes emails with specific words |
| Size | Emails larger or smaller than a set size |
| Has attachment | Emails with or without attachments |
You can combine multiple criteria in a single filter for more precise targeting.
Available Actions
When a filter condition is met, Gmail can automatically:
- Skip the Inbox (archive immediately)
- Mark as read
- Star it
- Apply a label
- Forward it to another address
- Delete it
- Never send it to Spam
- Always mark it as important (or never)
- Categorize it (Primary, Social, Promotions, etc.)
Multiple actions can be applied by a single filter at the same time.
Managing and Editing Existing Filters
All your active filters live in Gmail Settings → See all settings → Filters and Blocked Addresses. From there you can:
- Edit any existing filter
- Delete filters you no longer need
- Export filters as an XML file (useful for backing them up or importing to another account)
- Import filters from an XML file
When editing a filter, you can also check "Apply filter to matching conversations" to run it retroactively against emails already in your inbox.
Where Filters Get Complicated 🔍
Filters are straightforward to create, but their effectiveness varies depending on several factors:
Volume and specificity of your criteria. A filter set to "From: newsletters@" is clean and targeted. A filter built around common words like "update" or "account" may catch far more — or far less — than you expect.
Gmail's own categorization. Gmail automatically sorts emails into tabs (Primary, Social, Promotions, Updates, Forums) using its own logic. Filters can override or reinforce that behavior, but the interaction between manual filters and automatic categorization isn't always predictable.
Multiple accounts and aliases. If you use Gmail with multiple addresses, aliases, or a Google Workspace account, filter behavior can differ. Filters set on one account don't carry over to another. The "To" criteria becomes especially relevant if you receive mail through several addresses pointing to one inbox.
Mobile vs. desktop. Filters created on desktop apply universally — Gmail on mobile follows the same filter rules. However, you can only create and manage filters through the desktop browser interface, not the Gmail mobile app.
Forwarding filters and security settings. Filters that automatically forward emails to external addresses may require additional verification steps, particularly on Google Workspace accounts where admins can restrict forwarding.
Common Use Cases and How They Differ
Different people lean on filters very differently:
- Inbox zero practitioners often use aggressive archiving filters and heavy labeling to keep the inbox clean and route everything into organized folders
- Work users on Google Workspace may have admin-imposed limits on what filters can do, particularly around forwarding
- Power users sometimes build elaborate label hierarchies supported by dozens of filters, while others find two or three well-placed filters handle 90% of their needs
- Users managing high-volume automated emails (receipts, alerts, newsletters) typically benefit most from size, sender domain, and keyword combinations
The same filter setup that works well for one person's email habits can create confusion or missed messages for another.
One Thing Filters Can't Do
Gmail filters work on incoming mail only. They don't apply to emails you send, drafts, or messages already in your inbox unless you explicitly check the "Apply to matching conversations" option during setup. They also don't interact with Chat messages, which are handled separately within Gmail's interface.
How useful any particular filter configuration turns out to be depends entirely on how your inbox is structured, how consistently senders behave, and what you're actually trying to accomplish — and that part only you can see.