Accounts & trust

Test a Gmail filter before it starts sorting your mail

Search first, inspect the matches, and begin with a label so that an overbroad Gmail rule is easier to spot.

A filter for receipts sounds harmless until it catches a delivery problem that needs an answer. Before automating a mailbox task, decide which messages should match and which should stay outside the rule. A familiar sender alone may be too broad.

Treat the search results as a rehearsal

In Gmail on a computer, open the search options and enter your proposed criteria. Run the search before creating the filter. Inspect several results, including an older message and one that looks unlike the others.

For a fictional example, a shop sends both receipts and support replies from the same address. A sender-only rule would include both. Adding a distinctive subject phrase can narrow the selection, but only if the receipts actually use that phrase. Keep a wanted receipt and an unwanted support reply as two test cases. If either is classified incorrectly, revise the criteria.

Start with a visible, reversible action

Choose a label for the first version of the rule. Leave archiving, deletion and forwarding off while you observe what it catches. Those actions solve different problems and make mistakes harder to notice. A label on a message is easier to inspect than a message you never see in the inbox.

Check the next few matching messages. Google notes that a reply must itself meet the criteria to be filtered; one labelled conversation does not prove that every later reply matches.

Keep one rule understandable

Name the label clearly and record why you chose the criteria. Gmail's settings list filters under Filters and Blocked Addresses, where you can edit or remove a rule. If the result is wrong, fix that rule and inspect affected messages separately; do not assume changing the rule reverses earlier actions.

Sources & further reading

  1. Google — Create rules to filter your emails

Sources support the technical explanations. Examples and suggested checks are editorial guidance.