How can I create rules in Gmail

Use rules to manage incoming email in Mail on Mac

You can create rules to manage incoming emails and automate tasks like replying to or deleting emails. Example: You could create a rule to flag emails from a specific person or automatically move emails from inbox to other mailboxes.

Open mail

  1. Select "Mail" in the app on your Mac, go to Mail> Preferences and click Rules.

    For an example of a rule, select a provided rule and click Edit. Click on "Cancel" to close the rule.

  2. Click on "Add rule" and enter a name for the rule.

  3. Specify whether any or all of the conditions must be met for the rule to apply to an email.

  4. Set the terms.

    Select “Edit Header List” at the bottom of the first pop-up menu if you want to use different header fields for a condition. In the "E-Mail Header" window click on "Add" to create your own fields for the header.

  5. Select actions to take on emails that meet the conditions. Click the "Add" buttonto specify multiple actions.

    You can use AppleScript scripts as rule actions.

  6. When you're done, click OK and then decide whether you want the rules to apply to emails already in mailboxes or to new emails.

    You can also apply rules to existing emails later. To do this, choose “Email”> “Apply Rules”.

If you have multiple rules, they will be applied in the order they appear in the list of rules. Drag a rule up or down to change the order.

Mail stops applying rules to an email when the Stop Rules Check action is performed or when an email is transferred to another mailbox using rules that are on a mail server or on a computer or device be used, which is synchronized with your computer.

If you're using iCloud Drive, the rules are also available on your other Mac computers with iCloud Drive turned on and Mail selected in the iCloud Drive options. Files attached to rules such as audio files or scripts are not available. For more information, see Use iCloud Drive to back up documents.