sodcalculator

10 Tech How-To

How to Create Gmail Rules to Filter Emails

Guide 10-9671 · Updated · Step by step

Gmail rules (also called filters) automatically sort incoming mail into labels, forward it, mark it as read, delete it, or star it. They save you from manually sorting newsletters, receipts, and notifications. This guide walks you through building a filter from scratch, editing it later, and avoiding the most common pitfalls.

What You’ll Need

  • A Gmail account (free or Google Workspace).
  • Access to Gmail in a web browser (the steps differ slightly on the mobile app).
  • An idea of which emails you want to filter (e.g., from a specific sender, with a certain subject, or containing a keyword).

Step-by-Step

  1. Open Gmail in your browser. Go to mail.google.com and sign in if needed.
  2. Click the search options icon. It’s the small funnel-shaped icon on the far right of the search bar at the top.
  3. Enter your filter criteria. In the pop-up window, fill in one or more fields:
    • From: the sender’s email address (e.g., newsletter@example.com).
    • To: the recipient (useful if you have multiple addresses).
    • Subject: words that appear in the subject line.
    • Has the words: keywords that appear anywhere in the email.
    • Doesn’t have: words that must NOT appear.
    • Size: larger or smaller than a certain size (e.g., 1MB).
    • Date within: emails newer than a certain period.
    • Search: also lets you specify labels, categories, or attachments.
  4. Click “Create filter” at the bottom of the pop-up. (If you’d rather see which emails match first, click “Search” to preview, then come back and click “Create filter.”)
  5. Choose what to do with matching emails. You can tick one or more boxes:
    • Skip the Inbox (Archive it) – keeps it out of your main view.
    • Mark as read – so it doesn’t show as unread.
    • Star it – for important ones.
    • Apply a label – pick an existing label or create a new one.
    • Forward it – to another email address (you’ll need to confirm the forwarding address).
    • Delete it – sends to Trash (be careful, this is permanent after 30 days).
    • Never send it to Spam – useful for legitimate bulk mail.
    • Send template – auto-reply with a canned response (only if you’ve set up templates).
  6. Click “Create filter” again to save. A confirmation appears.
  7. Optional: Apply to existing emails. After creating, you’ll see a prompt: “Apply to X matching conversations?” Click “Also apply filter to matching conversations” if you want it to process emails already in your inbox.

To edit or delete a filter later: go to Settings (gear icon) → See all settings → Filters and Blocked Addresses. Click “edit” or “delete” next to the filter.

Common Mistakes

  • Being too broad. A filter with just “from: @gmail.com” will catch every Gmail sender, including personal contacts. Use a specific address or add a keyword.
  • Forgetting to check “Also apply to existing conversations.” The filter only affects new mail unless you apply it to old ones.
  • Using “Delete it” for important mail. If you’re not 100% sure, use “Archive” instead – it’s recoverable.
  • Overlapping filters. If two filters match the same email, both actions run. For example, one filter archives and another deletes – the email gets deleted.
  • Not testing. After creating a filter, send yourself a test email that matches the criteria to verify it works.

Tips

  • Use the Has the words field with operators like subject:(newsletter) or from:example.com to target more precisely.
  • Create labels first (e.g., “Receipts”, “Newsletters”) so you can select them quickly when building the filter.
  • To filter based on an email you’ve already received, open the email, click the three-dot menu, and choose “Filter messages like these.” Gmail pre-fills the criteria.
  • Combine filters with Gmail’s built-in categories (Primary, Social, Promotions) by using category:promotions in the search field.
  • If you forward emails, be aware that the forwarding address must be verified first. Gmail sends a confirmation link to that address.

Troubleshooting

Filter isn’t working. Check the criteria in Settings → Filters. Make sure the email actually matches. For example, a filter with “from: example.com” won’t match if the sender’s address is “news@example.org”. Also confirm the filter is enabled (not paused).

Emails are being deleted unexpectedly. Look for a filter with “Delete it” checked. If you find one, edit it to uncheck that option. Remember, deleted emails stay in Trash for 30 days – you can recover them from there.

Filter applies to old emails but not new ones. This can happen if the filter is too specific or if the email is being caught by a different filter first. Test with a new email and check the “All Mail” view – the email might be archived instead of in the inbox.

Can’t create a filter because the search returns nothing. Your criteria might be too restrictive. Remove some fields and try again. Also check that you’re signed into the correct Gmail account.

Forwarding isn’t working. Go to Settings → Forwarding and POP/IMAP to confirm the forwarding address is verified. If you added it via the filter, you may need to re-add it there.

Frequently Asked Questions

Can I create a filter on the Gmail mobile app?

Yes, but it’s limited. Open an email from the sender you want to filter, tap the three-dot menu, and select “Filter messages like these.” You can then set actions like “Apply label” or “Archive.” For full control, use the web version.

How do I stop a filter from applying to future emails?

Go to Settings → Filters and Blocked Addresses, find the filter, and click “Delete.” You can also click “Edit” to change the criteria or actions.

Can I use a filter to automatically reply to emails?

Yes, but only with a “Send template” action. First, create a template in Settings → Advanced → Templates. Then, in the filter, select “Send template” and choose the template. Note that this sends a reply to every matching email, which can be spammy – use with caution.

Will a filter work on emails already in my inbox?

Only if you tick “Also apply filter to matching conversations” when creating the filter, or if you manually apply it later. Otherwise, it only affects new emails.

How many filters can I have?

Gmail allows up to 1,000 filters per account. That’s plenty for most users. If you hit the limit, you’ll need to delete unused ones.

Can I filter by email size?

Yes, in the search options, use the “Size” field. Choose “greater than” or “less than” and enter a number in MB or KB. For example, size 5MB will find emails larger than 5 megabytes.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →