How to create rules in Gmail
Gmail has no menu called Rules: to create rules in Gmail, you make a filter. On a computer, click Show search options in the search box, enter who or what to match, click Create filter, pick what Gmail should do and click Create filter again. Gmail then applies it to new mail as it arrives.
Try ClearMyInbox free - bulk unsubscribe in one click, free to start.
How to create a rule in Gmail on a computer
Coming from Outlook? Outlook calls them rules (see how to create rules in Outlook); Gmail calls them filters, and they live behind the search box. Google's steps:
- Open Gmail.
- In the search box at the top, click Show search options.
- Enter your search criteria, such as a sender in From or a word in Subject. To check it catches the right emails, click Search and look at what comes up.
- At the bottom of the search window, click Create filter.
- Choose what you'd like the filter to do.
- Click Create filter.
Google lists what a filter can do with the mail it matches: send it to a label, archive, delete, star or forward it. A forwarding filter only forwards new messages, and a reply to a filtered message is only filtered if it meets the same criteria.
You can also start from an email you already have: check the box next to it, click More, then Filter messages like these, adjust the criteria and click Create filter.
Edit, delete or back up your Gmail rules
Click Settings, then See all settings, then the Filters and Blocked Addresses tab. Click Edit or Delete next to a filter; after editing, click Continue, then Update filter. Export at the bottom of the tab saves the filters you tick as an .xml file, and Import filters loads one back.
Can you create rules in the Gmail app?
Not full filters. Google's help page for filters only has a version for a computer, with no steps for the Gmail app on Android or iPhone. The iPhone and iPad app has one narrower option, which Google documents under labels: new messages that match your criteria are labelled automatically.
- In the Gmail app, at the top left, tap Menu, then Settings.
- Tap Inbox customizations, then Labels.
- Tap a label name, or create the label first if it is not there.
- Tap Add and type a name or email address in the From field. To add a subject or keyword, tap And.
- At the top right, tap Save.
That only adds a label. Google's Android pages describe no automatic labelling, so on Android, Google's only documented route to a rule is Gmail on a computer.
How do I make emails go to a specific label in Gmail automatically?
This is the Gmail version of "move emails to a folder": Gmail uses labels where Outlook uses folders. Make the label first (on the left, next to Labels, click Create new label, name it, click Create), then build a filter with the steps above and, in its actions:
- tick Apply the label and choose your label;
- tick Skip the Inbox too if the mail should only show under the label, which is the closest Gmail gets to a folder.
Without Skip the Inbox, the email lands in your inbox with the label on it.
How to create a Gmail filter for multiple email addresses
One filter can match several senders. In the From field, put OR, in capitals, between the addresses: amy@example.com OR david@example.com. Google's search help also accepts curly brackets, {from:amy from:david}, for the same thing.
Google notes that you can turn any search into a filter, so the other search operators work too: list: matches mail from a mailing list, and a minus sign excludes a word, as in from:example.com -invoice.
Apply a rule to emails you already have
Google's filter page describes filters as a way to manage incoming mail, and it documents no step for running one over the emails already in your account. When you create a filter, Gmail can show a tick to also apply it to the matching conversations already there, though Google's help pages do not describe it. The route Google does document is doing it by hand: run the same search, check the boxes next to the emails, click Labels at the top and pick the label, or archive them.
What Gmail filters cannot do
- Act on an email once it reaches an age. Every action Google lists happens as the mail is filtered.
- Keep only the newest email from a sender. No action Google lists looks at the sender's other emails, so a filter cannot keep the latest delivery update and clear out the earlier ones.
- Put newsletters into one email. A filter can label and archive them, but no filter action gathers them into one summary.
- Undo what a filter did. Google's pages cover editing and deleting a filter, not reversing what it already archived or deleted.
Why are my Gmail filters not working?
- Several addresses without OR. Google's work and school guide says you must include OR when you list more than one address (or use the curly brackets above).
- Old emails were not touched. A filter acts on mail as it arrives; older emails only change if you ticked the option to apply it to matching conversations, or handled them by hand.
- Replies slip through. A reply is only filtered if it meets the same criteria.
- Mail has gone missing. Google's advice for missing emails is to look in Filters and Blocked Addresses for filters that say "Delete it" or "Skip Inbox".
- Exclusions catch whole conversations. With a minus sign, Gmail finds matching messages first, so a conversation can still show up if one message in it matches.
Rules that also work on old mail, with ClearMyInbox
ClearMyInbox connects to Gmail through your Google sign-in and runs its rules on its own servers, so they work with your computer and mail app closed. It needs Google's permission to change your mail, and it reads headers such as sender, subject and date, never the body of an email.
Switch on a template (Archive social notifications, Roll up newsletters, Archive newsletters after a week, Archive delivery notices, Archive old mail, Keep only the latest newsletter, Mark newsletters as read), or build your own. A rule's conditions are Sender is, Sender contains, Domain is, Subject contains, Has an unsubscribe link, Older than N days and Is unread, all of which must be true, and it takes one action: Archive, Roll up, Mark as read, Keep newest, Always inbox or Trash. Preview shows how many emails in the last 30 days it would have handled, and up to 20 rules can be on at once.
- Older than is the age rule Gmail lacks. A matching email is acted on within the hour it reaches the age, and turning an age rule on also works through the mail already in your inbox. Other rules act on new mail, unless you tick the box, off by default, to also handle the matching emails already there.
- Keep newest keeps a sender's latest email and moves the older ones in your inbox to Trash. Keep only the latest newsletter does the same for newsletters, and sends the older issues already there to Trash the first time it matches.
- Roll up moves a sender's mail to ClearMyInbox/Rollup and sends one email, daily or weekly, listing what is waiting, or releases it to your inbox if you prefer. Nothing is deleted.
Trash is restorable for 30 days on Gmail. ClearMyInbox creates no Gmail filters or labels of your choosing: mail only goes to ClearMyInbox/Rollup, ClearMyInbox/Blocked, your archive, or Trash. Rules come with the Casual and Professional plans, and Lifetime holders have them too. On Free they show locked, but a rule you build is saved for when you upgrade.
Gmail filters vs ClearMyInbox rules
| What you want | Gmail filter | ClearMyInbox rule |
|---|---|---|
| New mail | Acted on as it arrives. | Moved after it arrives, usually within a minute or two on Gmail. |
| Mail by age | No filter action waits until an email is old. | Older than N days, acted on within the hour the email reaches the age. |
| Mail already in the inbox | A tick when you create the filter can apply it once to matching conversations. Google's help does not describe it. | Age rules work through it when you turn them on. Other rules need a tick, off by default. |
| Only the newest email from a sender | Not a filter action. | Keep newest: older ones in the inbox go to Trash. |
| Newsletters in one email | Not a filter action. | Roll up: one daily or weekly email lists what is waiting. |
| Undo | Google documents editing or deleting the filter, not undoing what it did. | Every action can be undone from History for 30 days. |
Use both: filters for labelling mail as it arrives, ClearMyInbox for jobs that depend on time or a sender's other emails. For one person you never want to hear from, blocking an email address in Gmail is quicker, and for mailing lists, stopping unwanted emails on Gmail explains why unsubscribing beats filtering. If the inbox is already full, start with how to clean up a Gmail inbox.