Skip to content
By ClearMyInbox · Updated

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:

  1. Open Gmail.
  2. In the search box at the top, click Show search options.
  3. 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.
  4. At the bottom of the search window, click Create filter.
  5. Choose what you'd like the filter to do.
  6. 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.

  1. In the Gmail app, at the top left, tap Menu, then Settings.
  2. Tap Inbox customizations, then Labels.
  3. Tap a label name, or create the label first if it is not there.
  4. Tap Add and type a name or email address in the From field. To add a subject or keyword, tap And.
  5. 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:

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

Why are my Gmail filters not working?

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.

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 wantGmail filterClearMyInbox rule
New mailActed on as it arrives.Moved after it arrives, usually within a minute or two on Gmail.
Mail by ageNo 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 inboxA 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 senderNot a filter action.Keep newest: older ones in the inbox go to Trash.
Newsletters in one emailNot a filter action.Roll up: one daily or weekly email lists what is waiting.
UndoGoogle 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.