Gmail AI filter: describe it in a sentence, get a real Gmail filter
Gmail filters are good at sorting mail and awkward to write. You know what you want, "archive newsletters, except the ones from my bank", but Gmail's filter form wants it as search terms in the right boxes. That translation is the part an AI does well.
What a Gmail filter actually is
A filter is a saved search with actions attached. Gmail runs the search on each new email, and when it matches, it does the actions. The search can look at:
- who sent it (
from:) and who it was sent to (to:,cc:) - the subject (
subject:) and words anywhere in the email - words it must not contain (
-word), attachments (has:attachment) and size (larger:5M)
The actions are: skip the inbox, mark as read, star, apply a label, forward, delete, never send to spam, mark important or not, and put it in a category tab.
What an AI can do, and what it can't
Gmail runs the filter, not the AI. So whatever writes your filter, the result is still a search on words and addresses. That decides what is possible:
- It can turn a sentence into the right search: "newsletters" becomes
unsubscribe(almost every bulk email carries the word), "except from my bank" becomes-from:yourbank.com, "invoices with a PDF" becomessubject:invoice has:attachment filename:pdf. - It can't make Gmail understand meaning. "Emails that need a reply" or "anything urgent" has no words to search for, so no filter can catch it reliably, whoever writes it. The best it can do is guess at phrases like "let me know", and a good tool tells you when it is guessing.
Always check the search before you trust it: paste it into Gmail's search box and look at what comes back. That is the mail the filter will act on.
Try it: write a filter from a sentence
The box at the top of our home page takes a sentence and gives back the Gmail search and the actions, with a link that runs the search in your Gmail so you can see the matches. No sign-in, and what you type isn't stored.
Some sentences to start from:
- "Archive newsletters except from my bank"
- "Label anything from my kids' school and star it"
- "Mark receipts as read and label them Receipts"
- "Never send email from my accountant to spam"
Put the filter into Gmail
You can type the search into Gmail's own filter form, or import the file the box gives you:
- Download
mailFilters.xmlfrom the box. - In Gmail, open
Settings → See all settings → Filters and Blocked Addresses. - At the bottom, click Import filters, choose the file, then Open file.
- Tick the filter, and Apply new filters to existing email if you want it to tidy old mail too, then Create filters.
Keeping many filters in plain English
One filter is easy. Forty, made over years, is where people lose track. Sign in to Gmail Filters to keep each rule as a sentence you can read and edit, and download them as one file for Gmail. If you already have a long list, the filter checker reads Gmail's export and explains each one.
Write the filter in a sentence. Gmail Filters turns "archive LinkedIn and mark it read" into a Gmail filter, opens its search in Gmail so you see what it catches, and gives you the file to import. Free, and you can try it without signing in.
Try it free