Monday, October 15, 2018

GMail Search & Filters : Search Syntax + some filter examples to auto label emails

References:

Gmail Filters : Exhaustive Syntax Documentation

Some advanced Gmail Filter topics

** Note ** : Gmail does NOT support search using partial matches, instead GMail

only supports while word searches.  E.g: This does not work: “Find emails that contain any word that starts with Driv%” , The

To and From are the only fields that allow p[artial searching, e.g: find emails that are from @ally.com

Searching:

1. Search Examples using GMails Search Syntax Examples:

Just copy aand paste the below searches into the Gmail search text box to test
  From is from a certain domain:
         from:(@ally.com)
         from:(@ally.com | @expediamail.com)
         same as
         from:(@ally.com OR @expediamail.com)
        
   Before/After Date
         before:2018/9/1
         after:2018/9/1 before:2018/11/18
        
   Before/After Relative Date (instead of specific date)
         newer_than:2d
         older_than:30d
    
   Search multiple labels!
         label:(sent OR inbox)
         label:(sent OR inbox) Indeed
         label:(awork-jobs OR awork-jobs-jobsites) Indeed
         label:(awork-jobs OR awork-jobs-jobsites) older_than:30d

Filtering and Labels

1. Create Gmail Filter to auto label incoming emails:

Requirement:

When an incoming email is received the email shall be saved to a label .\AWork\Jobs\Insurance if the email contains the word Cigna and if the email was not sent from jdoyle@MyDomain.NET

(Create the label first if it does not exist)

How to Build step by Step:

Search:

from:(-from jdoyle@MyDomain.NET) Cigna


Filter:

image_thumb[9]

2. Gmail Filters Syntax


Gmail Filter Syntax Examples for and/or searching:

OR
     to:adam OR subject:iPhone
     is same as
     {to:adam subject:iPhone}


AND
     to:adam AND subject:iPhone
     is same as
     to:adam subject:iPhone
     is same as
     (to:adam subject:iPhone )
   
() parens -> AND
{} brackets -> OR
    


3. Create advanced Filter to auto label incoming emails:

e.g: I need to move emails from Inobx into, I want to move emails based on following requirements:

If incoming email contains the words job or opportunity or contract and email is NOT from a job site alert, then save email to .\AWork\Jobs


If incoming email contains the words job or opportunity or contract and email is NOT from a job site alert AND email has the word Melbourne in it, then save email to .\AWork\Jobs\Melbourne


If incoming email contains the words job or opportunity or contract and email is NOT from a job site alert AND email has the word remote or telecommute in it, then save email to .\AWork\Jobs\Remote



.\AWork\Jobs

(job | opportunity | contract) -{remote from:{alert@indeed.com alerts@ziprecruiter.com inmail-hit-reply@linkedin.com noreply@updates.freelancer.com noreply@updates.freelancer.com info@mail.glassdoor.com noreply@glassdoor.com dartcontainer-jobnotification@noreply.jobs2web.com}} -in:chats


Looks like this:

image_thumb[1]


.\AWork\Jobs\Melbourne

Search:

Find all job emails for melbourne area that are NOT from an automated job site like indeed or ziprecruiter and not in my chats.

(in:anywhere (job | opportunity | contract) (melbourne | "Palm Bay" | Cocoa) -subject:Enterprise -("car rental") -{remote from:{alert@indeed.com alerts@ziprecruiter.com inmail-hit-reply@linkedin.com noreply@updates.freelancer.com noreply@updates.freelancer.com info@mail.glassdoor.com noreply@glassdoor.com dartcontainer-jobnotification@noreply.jobs2web.com}} -in:chats)

Filter:

image_thumb[3]


.\AWork\Jobs\Remote

Search:

((remote | telecommuting | telecommute | remoting) -from:{jdoyle@jrdtechnologies.net alert@indeed.com alerts@ziprecruiter.com inmail-hit-reply@linkedin.com noreply@updates.freelancer.com noreply@updates.freelancer.com info@mail.glassdoor.com noreply@glassdoor.com dartcontainer-jobnotification@noreply.jobs2web.com})


Filter:

image_thumb[5]

When saving a filter be sure to use these options to move an email to a label:

image_thumb[7]

Google Search:

below applies to Google search

1. Google Search by date:

image

 

FYI:

Why Searching using Wildcard in Gmail doesn’t work and some alternatives

https://www.labnol.org/internet/advanced-gmail-search/21623/

http://sirlagz.net/2015/04/27/searching-gmail-with-wildcards/

(online2|online3|online4).provider.com

No comments:

Post a Comment