How to Create Rules in Gmail for (Almost) Anything

Get your Gmail email organized and keep it that way

Screenshot of a Gmail inbox with 6,763 messages

gabrielle_cc / Pixabay

Apply filters to your Gmail account to control how emails are labeled, to automatically archive or delete messages, or to mark messages with a star. You can even create filters that forward emails to another address or move messages with attached files to a specified folder. There are two ways to create rules that automatically filter email. Create a rule from scratch and enter all the requested information. Or, select one or more emails that meet the criteria for the rule and create a filter based on the header or content details.

How to Create a Gmail Rule From Scratch

To create a Gmail rule from scratch:

  1. Open Gmail in a web browser.

  2. Select the Search mail dropdown arrow.

    Search mail field in Gmail
  3. In the Search mail screen, select one or more criteria for the new rule:

    • From: Select email from one or more specific senders.
    • To: Specify email sent to one or more specific recipients.
    • Subject: Specify partial or complete text in the message subject line. 
    • Has the words: Filter messages based on specific words found in the body of the email.
    • Doesn't have: Filter messages based on specific words that are not found in the body.
    • Size: Filter messages based on size, either greater than or less than a specific baseline measurement.
    • Date within: Filter messages based on when they were sent. Several predefined intervals are available.
    • Search: Limit the filter to specific folders or labels, or specify a search on all mail.
    • Has attachment: Apply the rule only to messages that contain attached files.
    • Don't include chats: Apply the rule to emails only; not to chat conversations.
  4. Choose Create filter.

    To show the list of messages that meet the rule criteria, select Search.

    Search button in filter dropdown
  5. Select the check box next to the options that specify the behavior you want to apply to this rule. For example, select the Skip the Inbox (Archive it) check box to automatically archive messages that meet the specified criteria.

    Skip the inbox (Archive it) option in Gmail
  6. Select Create filter to activate the new rule.

How to Create a Gmail Rule From Existing Emails

When you receive an email that you want to automatically move to another folder, mark as read, or delete, create a rule from the selected message.

To create a rule from an existing email:

  1. Open Gmail in a web browser.

  2. Select the check box next to the message that meets the criteria for your new rule.

  3. Select More (the three vertically aligned dots on the Gmail toolbar).

  4. Choose Filter messages like these.

    Filter messages like these option in Gmail
  5. Select or correct the criteria to apply to the new rule. Some options may be pre-populated with details from the selected message. 

  6. Select Create filter.

    To show which messages meet the specified criteria, select Search.

    Create filter and Search buttons in Gmail
  7. Select the check box next to the options that specify the behavior you want to apply to the rule. Options include Skip the Inbox (Archive it), Mark as read, Star it, and Delete it.

  8. Select Create filter to activate the new rule.

    Create filter button in Gmail

How to Manage Rules in Gmail

After you create a set of rules, modify or delete rules as your needs change.

To manage your Gmail filters:

  1. Open Gmail in a web browser.

  2. Select Settings (the gear icon).

  3. Select Settings.

    Settings menu item in Gmail
  4. In the Settings screen, choose Filters and Blocked Addresses.

  5. To make changes to a rule, select edit. To remove a rule so that it no longer filters your email, select delete.

    edit and delete buttons in Gmail Settings

Other Gmail Rules That Help You Stay Organized

One of Gmail's features is the ability to construct multiple aliases associated with your primary email address. This can be done with either a plus sign or a period. In either case, email addressed to these aliases is sent to your primary Gmail account. To filter messages from a specified alias, create a rule with the alias as the criteria, then assign behaviors to the rule.

  • To use the plus sign (+): Place it after the main portion of your email address followed by the additional text you want. For example, an alias of scottorgera@gmail.com that is modified to scottorgera+lifewire@gmail.com can be provided to anyone who wants information about Lifewire articles. You don't need to register this alias with Gmail because Google only uses the characters located before the plus sign to route the message to your inbox.
  • To use a period (.): Place it anywhere in your Gmail address before the @ symbol. Periods are ignored by Google. For example, valid aliases of scottorgera@gmail.com are scott.orgera@gmail.com, sco.ttorgera@gmail.com, scottor.gera@gmail.com. Additional characters cannot be added.