Step-by-step email filter setup

How to create email filters in Gmail (and Outlook rules), step by step.

In Gmail, select Show search options, enter who or what to match, run the search to check the results, then select Create filter and choose actions such as Skip the Inbox or Apply the label. In Outlook the same thing is called a rule: Settings, Mail, Rules, then Add new rule.

Gmail categoriesGmail filtersImportant markersApply to existing mail

Last updated

Gmail filter setup diagram showing search criteria, a test step, and message actions

Gmail filter setup has three parts: define the search, verify the matches, and choose the action. You can begin from Gmail's search options or from an existing message. Google documents both paths in its official filter instructions.

Testing matters because Gmail applies a saved filter automatically to new messages that meet its criteria. A broad keyword, an incomplete sender address, or the wrong use of OR can move legitimate mail. Inspect the search results before selecting Create filter.

Create and test a Gmail filter

  1. Open Gmail on a computer and select Show search options in the search box.
  2. Enter a sender, recipient, subject, phrase, attachment, size, or date criterion. Combine only the conditions the rule truly needs.
  3. Select Search and inspect both expected matches and false positives.
  4. Return to the search panel, select Create filter, and choose the actions.
  5. Select Apply the filter to matching conversations only when the tested result set is safe for existing mail.
  6. Create the filter, then review it under Filters and Blocked Addresses.

The filter Gmail can't build

Want Gmail to only show mail from people you know?

Gmail filters can't test whether a sender is in your contacts. KeepKnown adds that rule: contacts and approved domains stay in the inbox, and everyone else moves to KK:OUTSIDERS. Nothing is deleted.

The audit is free and changes nothing in your inbox.

Gmail filter actions and their effect

ActionResultUse it when
Skip InboxArchives matching mailThe message should remain searchable but not interrupt
Apply labelAdds a reusable Gmail labelYou need a stable review or project view
Categorize asRoutes mail to a Gmail category tabThe message fits Primary, Social, Promotions, Updates, or Forums
Mark as importantAdds Gmail's importance markerKnown high-value mail needs visibility
ForwardForwards matching new mailA verified recipient or workflow needs a copy
DeleteMoves matching mail to TrashThe rule is narrow, tested, and intentionally destructive

Create an email filter (rule) in Outlook

  1. In Outlook.com, Outlook on the web, or new Outlook, open Settings, select Mail, then Rules, and choose Add new rule.
  2. Name the rule and add a condition, such as From, Subject includes, or Sender address includes.
  3. Add an action, such as Move to a folder, Categorize, or Mark as read, and add an exception if needed.
  4. Select Run rule now if you want it to process messages already in the inbox, then save.
  5. In classic Outlook for Windows, use Home, Rules, then Manage Rules & Alerts and New Rule instead.

Manage the rule after creation

Edit or disable

Open Settings, choose See all settings, then Filters and Blocked Addresses to change or remove the rule.

Import or export

Gmail can export selected filters as XML and import a saved filter file into another account.

Know the limits

Forwarding affects new messages, and replies match only when the reply still satisfies the filter criteria.

When KeepKnown adds the missing layer

NeedNative GmailKeepKnown
Known sender or keywordCreate a filterSupported
Apply labels or categoriesCreate a filterSupported
Sender not in contactsNo native conditionContact-based condition
Preview a multi-condition ruleTest a search manuallyPreview real mail
Save without immediate enforcementNot availablePaused by default
Explain why a message movedInspect the ruleDecision log

Questions before you connect.

How do I create email filters in Gmail?

Open Gmail search options, enter criteria, test the search, then choose Create filter and select actions such as Categorize as, Mark as important, Apply the label, or Apply to matching conversations.

What does Categorize as do in a Gmail filter?

The Categorize as filter action directs matching email into one of Gmail's existing category tabs.

Can I apply a Gmail filter to existing emails?

Yes. After testing the criteria, select the option to apply the filter to matching conversations before creating or updating the rule.

Can I create Gmail filters in the mobile app?

Gmail's full filter creation and management workflow is designed for Gmail in a computer browser.

How do I create email filters in Outlook?

Outlook calls filters rules. Open Settings, select Mail, then Rules, choose Add new rule, add a condition and an action, and save. Select Run rule now to apply it to messages already in the inbox.

Why isn't my Gmail filter working?

Usually the criteria match differently than expected, so run them as a search first. Filters act on new mail unless you also apply them to matching conversations, and they cannot test whether a sender is in your contacts.

Gmail filter setup

Let contacts through. Move unknown senders aside automatically.