Filter calendar invites/updates
Query: from:(-me) {filename:vcs filename:ics} has:attachment
Do this: Skip Inbox, Apply label "Calendar", Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7890</id >
<updated >2026-02-09T18:34:11Z</updated >
<content ></content >
<apps : property name =' hasTheWord' value =' from:(-me) {filename:vcs filename:ics}' />
<apps : property name =' hasAttachment' value =' true' />
<apps : property name =' label' value =' Calendar' />
<apps : property name =' shouldArchive' value =' true' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Filter emails coming to shared email address which don't have given words
Query: to:(team@example.com) -{"important alert"}
Do this: Skip Inbox, Apply label "To team", Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' to' value =' team@example.com' />
<apps : property name =' doesNotHaveTheWord' value =' " important alert" ' />
<apps : property name =' label' value =' To team' />
<apps : property name =' shouldArchive' value =' true' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Filter emails coming from certain address pattern but don't have certain subject
Query: from:(*@*.example.com) subject:(-"Example-Org Weekly Analytics")
Do this: Apply label "Example-org", Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' from' value =' *@*.example.com' />
<apps : property name =' subject' value =' -" Example-Org Weekly Analytics" ' />
<apps : property name =' label' value =' Example-org' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Filter emails coming from sender with given word in its title
Example: from: 'AwesomeCompany' via MemberGroup <members@example.com>
Query: from:("'AwesomeCompany'")
Do this: Skip Inbox, Apply label "AwesomeCompany", Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' from' value =' "' AwesomeCompany'" ' />
<apps : property name =' label' value =' AwesomeCompany' />
<apps : property name =' shouldArchive' value =' true' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Filter emails coming from certain address AND with given string in its title
Query: from:(notifications@example.com, example-operations[robot])
Do this: Skip Inbox, Apply label "Example Operations", Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' from' value =' notifications@example.com, example-operations[robot])' />
<apps : property name =' label' value =' Example Operations' />
<apps : property name =' shouldArchive' value =' true' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Forward emails to another address and mark as read
Query: from:(*@example.com) subject:("To be Forwarded")
Do this: Skip Inbox, Mark as read, Apply label "Forwarded", Forward to myaddress@mydomain.com, Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' from' value =' *@example.com' />
<apps : property name =' subject' value =' " To be Forwarded" ' />
<apps : property name =' label' value =' Forwarded' />
<apps : property name =' shouldMarkAsRead' value =' true' />
<apps : property name =' shouldArchive' value =' true' />
<apps : property name =' forwardTo' value =' myaddress@mydomain.com' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Filter emails which have specific words
Query: from:(*@example.com) Launched, into. (in UI: Has the words: Launched, into)
Do this: Skip Inbox, Mark as read, Apply label "Example:Launched", Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' from' value =' *@example.com' />
<apps : property name =' hasTheWord' value =' Launched, into' />
<apps : property name =' label' value =' Example:Launched' />
<apps : property name =' shouldArchive' value =' true' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Filter emails which have exact words combination
Query: from:(*@example.com) "changed this sentiment."
Do this: Skip Inbox, Mark as read, Apply label "Example:Changed", Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' from' value =' *@example.com' />
<apps : property name =' hasTheWord' value =' " changed this sentiment." ' />
<apps : property name =' label' value =' Example:Changed' />
<apps : property name =' shouldArchive' value =' true' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Automaticaly move email to "bin" by filter
Query: from:(*@spammersite.com)
Do this: Mark as read, Delete it, Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' from' value =' *@pspammersite.com' />
<apps : property name =' shouldMarkAsRead' value =' true' />
<apps : property name =' shouldTrash' value =' true' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >
Filter emails by mailing list
Query: list:(<all.us.example.com>)
Do this: Skip Inbox, Apply label "To everyone", Never send it to Spam, Never mark it as important, Categorize as Primary
XML entry (from export):
<entry >
<category term =' filter' ></category >
<title >Mail Filter</title >
<id >tag:mail.google.com,2008:filter:z123456*7891</id >
<updated >2026-03-12T15:49:59Z</updated >
<content ></content >
<apps : property name =' hasTheWord' value =' list:(< all.us.example.com> )' />
<apps : property name =' label' value =' To everyone' />
<apps : property name =' shouldArchive' value =' true' />
<apps : property name =' shouldNeverSpam' value =' true' />
<apps : property name =' shouldNeverMarkAsImportant' value =' true' />
<apps : property name =' smartLabelToApply' value =' ^smartlabel_personal' />
<apps : property name =' sizeOperator' value =' s_sl' />
<apps : property name =' sizeUnit' value =' s_smb' />
</entry >