How to Create a Filter in Gmail
Set up a Gmail filter that automatically labels, archives, or deletes incoming mail based on sender, subject, or keywords, and manage it later.
Gmail filters sort incoming mail before you see it. A filter can label, archive, delete, or star any message that matches a sender, subject, or keyword, and it keeps running on every new message that arrives.
Open the search options
In Gmail on the web, click the search options icon (the sliders) at the right end of the search bar at the top of the page. A panel opens with fields for From, To, Subject, Has the words, Doesn't have, Size, and Date within.
Fill in what the filter should match
Enter the criteria. To catch everything from one sender, type their address in From. To catch a recurring report, use Subject. To catch a keyword anywhere in the message, use Has the words. Click Search first if you want to preview which existing messages match before committing.
Click Create filter
At the bottom of the panel, click Create filter. Gmail switches to a second panel listing the actions it can take on matching mail.
Choose what happens to matching mail
Tick one or more actions. The common ones are Skip the Inbox (Archive it), Apply the label (pick an existing label or create a new one from the dropdown), Mark as read, Delete it, and Never send it to Spam. To run the filter on messages already in your mailbox, tick Also apply filter to matching conversations.
Click Create filter again
Click the blue Create filter button. The filter starts working on the next message that matches, and on existing mail if you ticked the last box.
Edit or delete a filter later
Go to Settings (gear icon), See all settings, Filters and Blocked Addresses. Every filter is listed with its criteria and actions. Click edit to change it or delete to remove it. The same page has an export option for reusing filters in another account.
In the Gmail app. Filters cannot be created or edited in the Android or iPhone app. Set them up in a desktop browser. Once created, they run on Google's servers, so they apply to mail on every device.
Before using Delete it. Run a search with the same criteria first to make sure the filter will not catch mail you want to keep. Deleted mail goes to Trash and is removed for good after 30 days.
More Gmail how-tos
- How to Add a Signature in Gmail
- How to Add Another Account to Gmail
- How to Automatically Forward Gmail to Another Address
- How to Block a Sender in Gmail
- How to Change Your Gmail Password
- How to Create a Label in Gmail
- How to Delete All Emails from One Sender in Gmail
- How to Find Archived Emails in Gmail
- How to Find Large Emails in Gmail
- How to Mark All Emails as Read in Gmail
- How to Schedule an Email in Gmail
- How to Send Large Files in Gmail
- How to Turn Off Conversation View in Gmail
- How to Turn On the Vacation Responder in Gmail
- How to Unsend an Email in Gmail