To create a new inbox rule
- Open Gmail.
- In the search box at the top, click the Down arrow .
- Enter your search criteria. If you want to check that your search worked correctly, see what emails show up by clicking Search .
- At the bottom of the search window, click Create filter with this search.
- Choose what you’d like the filter to do.
- Click Create filter.
https://support.google.com/mail/answer/6579?hl=en