Gmail rules (called filters) automatically sort, label, forward, or delete incoming mail based on criteria you set. This guide shows you how to create rules from scratch or from an existing email, and how to manage them. You’ll need a Gmail account and access to the web version (rules can also be set up in the mobile app, but the web interface is easier).
What You’ll Need
- A Gmail account (free or Google Workspace)
- A web browser (Chrome, Firefox, Safari, Edge, etc.)
- Access to your Gmail inbox
Step-by-Step
- Open Gmail in your browser. Go to mail.google.com and sign in if you haven’t already.
- Click the gear icon (Settings) in the top-right corner of the Gmail window. It’s the gear icon next to your profile picture.
- Select “See all settings” from the dropdown menu. This opens the full Settings page.
- Click the “Filters and Blocked Addresses” tab. It’s at the top of the Settings page, between “Labels” and “Forwarding and POP/IMAP”.
- Click “Create a new filter”. This opens a dialog box where you define the criteria for your rule.
- Set your filter criteria. In the dialog box, you can specify:
- From: The sender’s email address or domain (e.g., news@example.com or @example.com).
- To: The recipient’s email address (useful if you have multiple aliases).
- Subject: Words that appear in the subject line.
- Has the words: Words that appear anywhere in the email (subject and body).
- Doesn’t have: Words that should NOT appear.
- Size: Larger or smaller than a certain size (e.g., > 5MB).
- Has attachment: Check this box to only match emails with attachments.
- Don’t include chats: Exclude chat messages from the filter.
You can combine multiple criteria – all must be true for the filter to apply.
- Click “Create filter”. This button is at the bottom-right of the dialog box.
- Choose what to do with matching emails. After clicking “Create filter”, you’ll see a list of actions. Check any combination of the following:
- Skip the Inbox (Archive it): The email goes directly to “All Mail” and never appears in your inbox.
- Mark as read: The email is marked as read immediately.
- Star it: Adds a star to the email.
- Apply a label: Choose an existing label or create a new one (e.g., “Newsletters”).
- Forward it to: Enter an email address to forward the email to (e.g., your work email).
- Delete it: Sends the email to Trash.
- Never send it to Spam: Prevents the email from being marked as spam.
- Send canned response: Automatically reply with a pre-written response (requires the Canned Responses lab).
- Also apply filter to matching conversations: If you check this, the filter will also apply to emails already in your inbox that match the criteria.
- Click “Create filter” again. This confirms the action and saves your rule.
Alternatively, you can create a filter directly from an existing email:
- Open the email you want to base the rule on.
- Click the three-dot menu (More) in the top-right of the email.
- Select “Filter messages like these”.
- Gmail will pre-fill the criteria based on that email’s sender and subject. Adjust as needed, then follow steps 7-9 above.
Common Mistakes
- Using too many criteria: If you set both “From” and “Subject”, the filter only matches emails that meet both conditions. If you want either condition, you need to create two separate filters.
- Forgetting to check “Also apply filter to matching conversations”: If you create a filter to clean up existing emails, you must check this box. Otherwise, the filter only affects new emails.
- Creating a filter that deletes important emails: Double-check your criteria before choosing “Delete it”. A typo in the “From” field could delete emails you need.
- Not testing the filter: After creating a filter, send yourself a test email that matches the criteria to confirm it works as expected.
- Overlapping filters: If you have multiple filters that match the same email, they all apply. This can lead to unexpected behavior (e.g., one filter archives, another deletes).
Tips
- Use labels to organize, not folders: Unlike folders, labels allow an email to have multiple labels. This is more flexible for categorizing.
- Combine filters with stars: Star important emails from a specific sender so they stand out even if you archive them.
- Use “Has the words” for advanced matching: You can use operators like from: or subject: in the “Has the words” field to refine your search. For example, from:boss@example.com subject:report matches emails from your boss with “report” in the subject.
- Edit a filter easily: Go to Settings > Filters and Blocked Addresses, click “edit” next to a filter to change its criteria or actions.
- Export filters: You can export filters as XML files and import them into another Gmail account. This is handy for migrating accounts.
Troubleshooting
- Filter not working: Check that you clicked “Create filter” twice (once to set criteria, once to set actions). Also verify the criteria are correct – a common issue is using a partial email address that doesn’t match the sender’s actual address. For example, @example.com matches any sender from that domain, but example.com without the @ might not.
- Filter works on new emails but not old ones: You likely forgot to check “Also apply filter to matching conversations”. Edit the filter and check that box, then save.
- Filter is archiving emails but they still show in inbox: This can happen if the filter is set to “Skip the Inbox” but the email was already in your inbox before the filter was created and you didn’t check the “Also apply” option. Or, if you have multiple filters, another filter might be overriding the archive action.
- Filter is not deleting emails: Check that the filter’s action is set to “Delete it”. Also, if the email is in a conversation, Gmail might not delete the entire thread if some messages don’t match the filter. Consider using “Delete it” along with “Also apply filter to matching conversations” to clean up existing threads.
- Can’t find the filter settings: Make sure you’re in the full Settings page (click “See all settings”), not the quick settings panel that appears when you click the gear icon.
Frequently Asked Questions
Can I create a rule that moves emails to a folder?
Gmail doesn’t have folders, but labels work similarly. You can create a label (e.g., “Work”) and set the filter to “Apply a label”. The email will appear under that label in the left sidebar.
How do I stop a filter from applying to future emails?
Go to Settings > Filters and Blocked Addresses, find the filter, and click “delete”. This removes the filter entirely. If you only want to pause it, you can edit the filter and uncheck all actions, but this is not recommended as it will still match emails but do nothing.
Can I create a filter to auto-forward emails to another address?
Yes, in the filter actions, check “Forward it to” and enter the email address. Note that you may need to verify the forwarding address first if it’s new.
Why do my filters stop working after a while?
Filters don’t expire, but if you change your email address or the sender changes their domain, the criteria may no longer match. Also, if you have too many filters (Gmail allows up to 1,000), performance may degrade.
Can I create a rule that applies to emails I send?
Yes, in the filter criteria, you can set the “To” field to your own email address, or use “Has the words” with from:me. However, filters primarily act on incoming mail, so actions like “Skip the Inbox” won’t affect sent emails.
How do I create a rule based on a specific attachment type?
Gmail’s filter criteria don’t directly support file types. However, you can use “Has the words” with filename:pdf to match emails with PDF attachments. This works for common file extensions.
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
- Fix Error 0x8007025d in Windows 10
- Fix Alexa App Stuck on Setup
- Android Camera for 7 Office Tasks: Step-by-Step
- Pair Phone to Pioneer Stereo After Bluetooth Reset
- Fix Windows Not Saving Remote Desktop Credentials
- Remove Malware from Windows PC & Restore Accounts