How to Set Up and Use Gmail Rules

Creating Gmail Rules for a Clean Inbox

Gmail rules are an excellent way to organize, delete, and label your emails. You can do everything from automatically deleting marketing emails, and categorizing various important emails to emptying your spam folder.


Last updated: February 2, 2023

7 mins read

Without filters or rules, managing mail can be daunting. Gmail provides a fix for this. It’s called Gmail rules. Setting rules on your account can help you keep track of your messages and declutter your inbox.

You can apply rules to your Gmail account to customize emails into categories, automatically archive them, delete messages, or mark communications with a star. You can even use rules in Gmail to forward emails to different addresses or transfer emails with attachments to a specific location.

This article will go over the many methods for setting up and quickly using rules in Gmail. Let’s begin!

How to create a rule in Gmail?

There are two ways to create new rules in Gmail. You can start from scratch when creating a rule or using an already-existing message or collection of messages. Let’s understand both of these ways:

Ready to transform how you work in Gmail?
Teams love Keeping because you can collaborate on a shared inbox without ever leaving Gmail. It's not magic, but it feels magical.

Create a Gmail Rule From Scratch

  1. Launch a web browser and go to Gmail.
  2. Choose “Search Mail” from the drop-down menu.

gmail rules search mail


  1. In the Search Mail screen, select your desired criteria:
    • Launch Gmail.
    • Click “Show search options” in the search box at the top.
    • Type in your search parameters. 
    • Click Search to examine the emails that come up.
    • Click “Create filter” at the bottom of the search box.
    • Select what you want the rule to accomplish (in the example below, we are skipping the inbox)
    • Select “Create Filter” to activate the new rule.



Create a Gmail Rule From Existing Emails

To make a rule from an email that already exists:

  • Launch a web browser and go to Gmail.
  • The message that complies with the requirements for your new rule should have a checkmark next to it.
  • Choose More (the three vertically aligned dots on the Gmail toolbar).
  • Select rule messages like these.



  • Choose or amend the standards to be used with the new rule. With information from the chosen message, some options might already be filled up.
  • Decide to create a rule.
  • Select the check box next to the options that specify the behavior you want to apply to the rule. Instead of going through the inbox, mark it as read, starred, or delete the email.
  • To activate the new rule, choose to “Create Filter.”



How to set Gmail rules to move emails to a folder?

Automatically categorizing emails within a rule can be an excellent way to declutter your mailbox. Here is how you can set it up:

Step 1

Click on the small arrow to the right of the search bar to add a new rule. You’ll see a list of search possibilities in a little box. You can decide which emails are subject to the rule by adding relevant search parameters.



Step 2

Then, click the “Create a rule with this search” button in the bottom-right corner and select what you want to do when a message with such a criteria lands in your inbox. There are several choices, and you can choose more than one option, but the most helpful one is “Apply the label x.”



Step 3

Click the blue “Create rule” button after selecting an existing label or creating a new one. If you want to categorize older emails, use the “Also apply the filter to matching discussions” option. You should get a confirmation message stating that your rule was created.

How to create rules in Gmail from an iPhone or iPad?

You’ll need to organize your inbox differently when it comes to iOS devices like iPhone or an iPad. This is because Google doesn’t let you define rules in the app version. Changing the inbox categories and tabs is an intelligent approach. You can sort emails into other tabs, such as Promotions or Social. As a result, when you open Gmail, you won’t see all your messages at once, making it easier for you to manage your inbox.

On your iPhone, follow these steps to add or remove tabs and inbox categories:

  1. Press the “Settings” button in the menu after opening “Gmail.”



  1. After choosing your account, choose “Inbox Type.”



  1. Select “Default Inbox.”
  2. Press the “Back” button after clicking “Inbox Categories.”
  3. Now, you can delete current categories and add new ones.

How can I block spam on my Gmail with rules?

Blocking spam on Gmail with rules is the easiest way to stop such emails. You can have a rule that automatically detects emails and deletes them if you have a particular website or sender is flooding your inbox with spam. Use the methods below to accomplish the same:

  • Select the three slider-bar-shaped icons at the top of the page to the right of the search box. You’ll see a window where you can enter your search parameters.
  • You can input email addresses next to the “From” section. Additionally, you can set a subject or the words that an email must contain. For instance, the best way to combat spam is to insert email addresses or subject lines that you know are spam.
  • Select the “Create a rule” option. It’s at the bottom of the search menu. Doing this will create a new rule based on your search criteria. 
  • Click the response you want for these messages. Check the appropriate box to accomplish this. For instance, you can automatically eliminate spam by selecting the “Delete it” checkbox next to any emails that match your search parameters.
  • Finally, click on “Create a rule.” The blue button at the bottom right is the one you want. Your emails now have a new rule which will help you block the spam senders.

Import or export Gmail rules

Utilizing the import/export filter options will allow you to use the same set of email filters on different Gmail accounts.

  • You must first click on the “gear icon” and then go to the “settings” option.
  • Click on “filters” and then the “prohibited addresses” section to export a filter.
  • Select the desired rule(s) using the checkboxes, then click the “export” button. Clicking on ‘export’ will generate an XML file.
  • Duplicate the configuration by editing this XML file with a text editor or by saving it and importing it into another Gmail account.
  • Use the gear icon, settings, and barred address paths once more to access the list of all your current Gmail rules before importing one.
  • Upload your XML file by selecting the “import filter” option. Make use of the recently imported filters. 
  • Use the Create Filter option after selecting the checkbox next to the imported filter to begin using it.

Other useful Gmail rules

Here are some common and more straightforward Gmail rules. These can simplify your life and increase your productivity. Some of them are:

1. Send messages automatically to specific labels or categories (or trash)

You can set up rules to send your email to particular folders so that they do not clutter your primary inbox, which may have important work messages. For example, if you have subscribed to promotional emails from your favorite brands, you can set up rules to divert those messages in a separate folder.

2. Recognize spam and delete it

Gmail recognizes spam emails. There are certain newsletters that you do not wish to see or messages from a few senders that aren’t identified as spam. You can set up a rule with specific email addresses. Gmail will direct those to the spam folder. 

3. Divert non-work related emails to separate folders

You can have a separate folder for promotional offers and divert a few messages that you don’t wish to receive to spam as mentioned above. Although, there might be a few non-work related messages that you wish to receive but do not want to clutter your inbox. In this scenario, filters can help you to manage them efficiently.

Move them to a different category or under a new label to avoid clutter. For instance, you don’t require an email to arrive in your inbox whenever someone follows you on Twitter.  

4. Block unwanted messages

Some people on your contact list are annoying because they consistently send you pointless chain letters or because they never appear to have anything significant to say. If they regularly clog up your inbox, you can add their mail addresses to your filter parameters as a sender and divert their messages directly to another folder.

5. Automatically assign duties

Filters can also assign specific tasks, provided they arrive in your email frequently enough. For instance, you might automatically forward a lead to a sales team member if you receive notifications of new leads that need to be followed up with.

This process is complex, significantly since your incoming emails will probably differ, but it might be helpful to recognize them with a particular subject line, keyword, or sender.

6. Identify to-do messages as necessary automatically

Applying a particular filter will automatically designate communications as important if you know they relate to a to-do item. For instance, you can flag all emails from a particular person, have an attachment, or contain a specific phrase as critical.

When you finish with them, you will be in charge of designating them as insignificant. You’ll be surprised at how much more productive you become if you follow this routine.

7. Automatically assign the proper labels to communications from specific projects or clients

To quickly separate emails related to various projects or clients, use filters. Depending on the urgency of these clients and projects, you might mark some as necessary while diverting the other messages to appropriate labels.


Gmail rules are an excellent way to organize, delete, and label your emails. You can do everything from automatically deleting marketing emails, and categorizing various important emails to emptying your spam folder.

Gmail rules play an extensive role in managing your mail for you and letting you automate the process of organizing your inbox. Knowing the steps and processes of setting up a Gmail rule will help you ensure that messages from specific high-priority clients always go to your inbox’s primary tab. 

On the contrary, low-priority messages like in-voice reports or marketing updates from different services can automatically get sorted into a separate folder and never even appear in your primary inbox.

Overall, Gmail rules boost your efficiency and relieve you of tedious and repetitive activities. So, start using Gmail rules, and you will have more time to focus on the crucial and essential tasks for the day.


Sanjana Sankhyan is a freelance writer who specializes in delivering data-driven blog posts for B2B SaaS brands. She helps businesses attract more audience and sales with her writing. If not writing, you’ll find her helping other freelancers improve their work. Find her on LinkedIn or Twitter.

Join 150+ teams that are sharing inboxes with us

The easiest way to upgrade your shared Gmail account. There’s no credit card is required.