Gmail Filters: Sort, Label and Archive Mail Automatically
Create a filter from a search or a message, edit or delete it, and export or import your filters. Based on Gmail Help.
Create a filter from a search or a message, edit or delete it, and export or import your filters. Based on Gmail Help.
A Gmail filter acts on incoming mail for you: it can label it, archive it, delete it, star it or forward it. This guide follows Gmail Help (computer version).

Google warns that a filter that forwards messages only affects new messages, and a reply to a filtered message is only filtered if it also matches your criteria.
On the same Filters and Blocked Addresses tab, you can tick filters and export them, or click Import filters, choose the file, click Open file, then Create filters. Google says this is how to restore a backup of your filters.
A shop sends a receipt from the same address every time. Open one receipt, choose Filter messages like these, and have the filter apply a label called Receipts and skip the inbox. Test the criteria with Search first so you do not hide something you need. Filters do not replace caution with strange mail, so read avoid and report phishing emails in Gmail.