google api - Advanced gmail search for received emails only -
i'm using google gmail api emails peoples gmail account. filter emails containing word "companyname" have pdf attachment. using following search query: companyname filename:pdf
. want further specify getting emails received, instead of sent.
does know how can filter received emails in gmail? tips welcome!
you specify don't want mails coming you, or mails having sent label etc.
q = companyname filename:pdf , -from:me , -in:sent , -is:chat , -in:draft , -in:trash
which result in following request:
get https://www.googleapis.com/gmail/v1/users/me/messages?q=companyname+filename%3apdf+and+-from%3ame+and+-in%3asent+and+-is%3achat+and+-in%3adraft+and+-in%3atrash&key={your_api_key}
Comments
Post a Comment