How to Create Filters in Gmail

How to Create Filters in Gmail

Gmail filters automatically sort, label, archive, delete, or forward incoming emails based on rules you define. Instead of manually organizing your inbox every morning, you set up a filter once and Gmail handles matching messages from that point forward. Filters only work on the desktop web version of Gmail — not the mobile app.


This is the most common method and gives you the most flexibility.

  1. Open Gmail on your computer.
  2. Click the search bar at the top of the page.
  3. Click the Show search options icon (the small sliders icon on the right side of the search bar).
  4. A dropdown panel appears with filter criteria fields:
    • From — sender’s email address
    • To — recipient (useful if you receive email at multiple addresses)
    • Subject — words in the subject line
    • Has the words — words anywhere in the email body or subject
    • Doesn’t have — exclude emails containing specific words
    • Size — filter by message size (greater than or less than)
    • Has attachment — only match emails with attachments
    • Date within — match emails within a date range
  5. Fill in one or more fields. You can test your criteria by clicking Search first to see which emails match.
  6. Once you’re satisfied, click Create filter (at the bottom right of the panel).
  7. Choose one or more actions (see section 4 for the full list).
  8. Optionally check Also apply filter to matching conversations to retroactively apply the filter to existing emails.
  9. Click Create filter.

2. Create a Filter from an Existing Email

This is the fastest way to set up a filter when you already have a message from the sender you want to filter.

  1. Open the email in Gmail.
  2. Click the three-dot menu (More) at the top of the message.
  3. Select Filter messages like these.
  4. Gmail pre-fills the From field with the sender’s email address.
  5. Adjust or add additional criteria if needed (subject, keywords, etc.).
  6. Click Create filter.
  7. Choose your actions and click Create filter to save.

You can also select an email from your inbox (without opening it), then click the three-dot menu in the toolbar above the message list and select Filter messages like these.


3. Create a Filter from Settings

  1. Click the gear icon in the top right of Gmail.
  2. Click See all settings.
  3. Go to the Filters and Blocked Addresses tab.
  4. Click Create a new filter.
  5. Enter your filter criteria in the form fields.
  6. Click Create filter.
  7. Choose your actions and click Create filter to save.

This method is useful when you want to review all your existing filters and create a new one in the same place.


4. Available Filter Actions

When you click Create filter, Gmail presents these actions. You can select multiple actions for a single filter.

ActionWhat it does
Skip the Inbox (Archive it)New matching emails bypass the inbox and go directly to the label (if one is applied) or All Mail
Mark as readMatching emails arrive already read — no unread badge
Star itAutomatically stars matching messages
Apply the labelAssigns a Gmail label (select an existing one or create a new label on the spot)
Forward it toAutomatically forwards matching emails to another email address
Delete itSends matching emails straight to Trash
Never send it to SpamPrevents matching emails from being flagged as spam
Always mark it as importantOverrides Gmail’s importance markers
Never mark it as importantPrevents Gmail from marking matching emails as important
Categorize asAssigns the message to a category tab (Primary, Social, Updates, Forums, or Promotions)

You can combine actions — for example, apply a label, skip the inbox, and mark as read all in one filter.


5. Edit and Delete Existing Filters

  1. Click the gear icon and select See all settings.
  2. Go to the Filters and Blocked Addresses tab.
  3. You’ll see a list of all your active filters.
  4. Click edit next to any filter to change its criteria or actions.
  5. Click delete to remove a filter entirely.

Deleting a filter does not undo its past actions. Emails that were already labeled, archived, or deleted by the filter stay where they are.


6. Import and Export Filters

Gmail lets you export filters as XML files and import them into another Gmail account — useful for setting up a new work account or sharing filter configurations with teammates.

To export filters:

  1. Go to Settings > Filters and Blocked Addresses.
  2. Check the boxes next to the filters you want to export (or select all).
  3. Click Export at the bottom of the list.
  4. Gmail downloads an XML file (called mailFilters.xml).

To import filters:

  1. Go to Settings > Filters and Blocked Addresses.
  2. Click Import filters at the bottom of the page.
  3. Click Choose File and select the XML file.
  4. Click Open file.
  5. Review the imported filters and click Create filters.

Imported filters take effect on new incoming messages. Check Also apply filter to matching conversations during import if you want them applied retroactively.


7. Common Filter Recipes

These cover the most common use cases. Each recipe lists the criteria and actions to select.

Send all newsletters to a label, skip the inbox:

  • Has the words: unsubscribe
  • Actions: Apply the label → “Newsletters”, Skip the Inbox, Mark as read

Most marketing emails and newsletters include the word “unsubscribe” in the footer, making this a reliable catch-all.

Auto-archive notifications from specific services:

  • From: notifications@github.com (or any notification address)
  • Actions: Skip the Inbox, Apply the label → “GitHub” (optional), Mark as read

Repeat for each service — or combine multiple addresses by using {notifications@github.com notifications@trello.com} in the From field.

Star emails from VIPs:

  • From: boss@company.com
  • Actions: Star it, Always mark it as important

You can list multiple VIP addresses separated by OR in the From field — e.g., boss@company.com OR cto@company.com.

Delete emails from a specific sender automatically:

  • From: spammy-sender@example.com
  • Actions: Delete it

Prevent legitimate emails from going to Spam:

  • From: invoices@vendor.com
  • Actions: Never send it to Spam

Forward specific emails to a teammate:

  • Subject: invoice
  • Actions: Forward it to → accounting@company.com

Note: forwarding filters require you to first verify the forwarding address in Settings > Forwarding and POP/IMAP.


8. Search Operators for Advanced Filters

Gmail’s filter criteria support the same search operators you use in the search bar. Use the Has the words field for complex queries.

OperatorExampleWhat it matches
ORfrom:alice OR from:bobEmails from either sender
- (minus)-newsletterExcludes emails containing “newsletter”
{} (curly braces){from:alice from:bob}Same as OR — matches either
has:attachmenthas:attachmentOnly emails with attachments
filename:filename:pdfEmails with PDF attachments
larger:larger:5MEmails larger than 5 MB
list:list:info@newsletter.example.comEmails sent to a specific mailing list
subject:subject:(weekly report)Emails with “weekly report” in the subject

These operators work in the Has the words field when creating a filter. Combine them for precise targeting.


9. Filters Only Work on Desktop

Gmail filters can only be created and managed through Gmail on the web. The Gmail mobile app (iOS and Android) does not support creating, editing, or viewing filters. However, filters you create on desktop apply to all incoming mail regardless of how you access it — so emails will be filtered even when you read them on your phone.

If you need to manage filters on the go, open Gmail in your mobile browser (not the app) and request the desktop site.


If you want to go beyond manual filters, Carly is an AI assistant that manages your inbox, handles scheduling, and connects to 200+ apps — automating email triage that static filter rules can’t cover.

More on Gmail: How to create labels in Gmail · How to block emails in Gmail · How to archive emails in Gmail · How to create email templates in Gmail · How to set out of office in Gmail

Ready to automate your busywork?

Carly schedules, researches, and briefs you—so you can focus on what matters.

Get Carly Today →

Or try our Free Group Scheduling Tool or Free Booking Page