Skip to content
Appcyclopedia
Gmail guide

How to set up Gmail filters that archive and label your mail

· 20 min task · Tested

By

Daniel Okonkwo writes about phones and mobile apps for Appcyclopedia, working on a MacBook Pro, a Pixel 9 Pro and an iPhone 15.

  • Web

Short answer

Search for the mail you want out of the way, click Show search options, then Create filter. Tick Skip the Inbox (Archive it) and apply a label, and leave Delete it unticked. The mail stops landing in your inbox but stays one click away under its label.

The catch: a filter that deletes sends mail to Trash, and Gmail empties Trash after 30 days. Because the filter hides it as it arrives, you are unlikely to notice a wrong match before it is gone.

Below: the steps from search to filter, what each action does and for how long, and how to tell a filter problem from mail that went missing for another reason.

How to build Gmail filters that clear your inbox without losing mail

To build Gmail filters that clear your inbox, get the search right first, then choose actions that hide mail rather than remove it. The last group deals with the mail already there and keeps the filter list honest.

  1. Get the search right first

    Start from a real message

    In Gmail on a computer, check the box next to an example of the mail you want filtered, click More (the three dots), then Filter messages like these. Gmail opens the search options with criteria taken from that message. Starting from a real message avoids guessing at the sender’s exact address.

  2. Test the search before you create anything

    In the search options box, adjust the criteria and click Search. Scroll the results: everything listed is what the filter will catch from now on, so anything you need to see should not be there.

  3. Widen or narrow the criteria with operators

    To catch a whole company, use a wildcard sender such as *@example.com. For a mailing list, the list: operator matches the list address. To narrow instead, add a subject word with subject: or exclude one with -. Click Search again after each change.

  4. Choose actions that hide mail, not remove it

    Tick Skip the Inbox and apply a label

    At the bottom of the search box, click Create filter. Tick Skip the Inbox (Archive it), then choose a label with Apply label, creating a new one if needed. The mail still arrives, stays searchable, and waits under that label in the left-hand list.

  5. Leave Delete it unticked

    A filter set to Delete it sends matching mail to Trash, and Trash is emptied permanently after 30 days. Since the point of the filter is that you never see this mail arrive, a mistake here is found late or never. Archiving costs nothing and can be reversed from the label.

  6. Create the filter and watch the label for a week

    Tick Also apply filter to matching conversations so the mail already in your inbox moves too, then click Create filter. For the next week, open the label every day or two and look for anything that should have reached you. If one does, edit the filter to exclude it before the label gets too long to check.

  7. Clear the backlog and keep the list honest

    Clear any backlog the filter did not move

    If you missed the box in step 6, older mail stays in the inbox. Run the same search, check the boxes next to the results, click Labels at the top and choose the label, then archive them. The backlog ends up in the same place the filter sends new mail.

  8. Review your filter list for Delete it and Skip Inbox

    Click Settings, See all settings, then Filters and Blocked Addresses. When mail goes missing, these are the two actions to look for: Delete it and Skip Inbox. Click Edit to change one or Delete to remove it.

  9. Export your filters as a backup

    On the same tab, check the boxes next to your filters and click Export at the bottom. Gmail gives you an .xml file you can keep, or bring back later with Import filters. Do this once your filters work, so a mistaken edit is easy to undo.

A common case: shop receipts and delivery updates bury the few emails from people. Steps 1 to 3 on one receipt, a filter that skips the inbox and applies a label called Receipts and also moves the old ones, leave the inbox with people in it and every receipt one click away.

Testing the search before you create the filter is the step that prevents lost mail, because the filter does exactly what the search does, silently.

More about Gmail

Google’s free email service, included with every Google Account.

Gmail filter not working? What to check

Some messages from the same sender still reach the inbox

They do not match the criteria, often because the sender uses several addresses. Widen the sender to the domain with a wildcard, or match a phrase every message contains. Replies are only filtered if they meet the same criteria.

Filtered mail is not under the label either

Search with Mail & Spam & Trash selected in the search options to find it. Then check Filters and Blocked Addresses for another filter that matches the same mail with Delete it.

Old mail is still in the inbox after creating the filter

Also apply filter to matching conversations was not ticked, so the filter only acts on new mail. Run the same search, then label and archive the older results by hand (step 7).

How Gmail filters decide what to catch

A filter is a saved search with actions attached. Every filter is built from the search options box, which is why the search you test is exactly what the filter will match.

Two details explain most surprises. Filters apply to individual messages, not the entire thread, and a reply is only filtered if it meets the same criteria.

So a newsletter can be archived while a colleague’s reply to it lands in the inbox. That is the filter working as documented, not failing.

A filter matches messages one at a time, so write the search for the message you want gone, not the conversation.

What each filter action does, and for how long

ActionWhat it changesHow long it lasts
Skip the Inbox (Archive it)Mail arrives but not in the inboxUntil you move it back
Apply labelMail is filed under a label you chooseUntil you remove the label
Delete itMail goes straight to Trash30 days, then gone for good
Forward itA copy goes to an address you verifiedNew mail only
StarMail is starred as it arrivesUntil you unstar it

Start with archive and label for everything. Add delete only for mail you are certain you never need, and even then, a label is safer.

When the missing mail was not your filter

Several other causes look identical from the inbox:

  • Spam or Trash. Both are emptied after 30 days or when you empty them yourself.
  • Deleted on another device. There is only one copy of each email, so deleting it in any synced app deletes it everywhere.
  • Another mail app. An app reading Gmail over POP or IMAP can archive or delete the original, depending on its settings.
  • Forwarding. Check Forwarding and POP/IMAP for an address you do not recognise. That can mean someone has access to your account.
  • Full storage. Storage is shared with Drive and Photos, and a full account may stop receiving mail.

To tell them apart, search with Mail & Spam & Trash selected. If the message is in Trash and a filter shows Delete it, it was the filter. If it is not anywhere, the guide to recovering deleted Gmail messages covers what can still be done.

How to tell your filters are working

After a week, look for these signs:

  • The inbox holds mail from people and little else.
  • Each label fills with what you expected and nothing you needed.
  • Filters and Blocked Addresses shows no Delete it you did not intend.

There is no published limit on how many filters an account can hold. If a label keeps catching things it should not, narrow that one filter rather than adding another on top.

Build the first filter from the next unwanted email

The safest filter is small and tested. Take the next newsletter or receipt, filter messages like it, check the search, then archive and label.

Archive and label every time, and let the Trash be something you do by hand.

Gmail filter questions

Should a Gmail filter delete unwanted mail?
No. Archive and label it instead. Deleted mail sits in Trash for 30 days and is then gone, and a filter hides it before you ever see it.
Can one Gmail filter apply two labels?
No. Only one label you created can be applied per filter. Create a second filter with the same search for the second label.
Do filters work in the Gmail app?
You create them on a computer; there is no documented way to make one in the app. Filters are stored in your account and act on mail as it arrives, so mail they archive does not reach the inbox the app shows either.
Can I back up my Gmail filters?
Yes. Under Filters and Blocked Addresses, select filters and click Export to save an .xml file. Import filters, on the same tab, brings them back.

Share this guide

Was this guide helpful?

Test log

Followed the steps? Tell us how it went on your device. Entries appear here after we check them.

  1. Worked Every step, start to finish · Elias Brandt Team
I tested this
How did it go?

Steps performed and confirmed 18 days ago

When you need this

If you want receipts, newsletters and notifications out of your inbox but still within reach, set up Gmail filters that archive and label them. Built carefully, a filter clears the clutter without hiding something you need.

Describes
Gmail on the web
Takes
Twenty minutes to set up, then a week of checking the labels
Platforms
Web
Published
4 October 2026
Facts checked
4 October 2026

Steps repeated and verified by on

  • Elias Brandt: the web steps on a ThinkPad X1 Carbon (Windows 11 Pro).

Part of How to stop unwanted email .

Next

gmailfiltersinbox