I'm using the Google gmail API to get emails from peoples gmail account. I filter for emails containing the word "CompanyName" which have a pdf as an attachment. using the following search query: CompanyName filename:pdf
. I now want to further specify this by only getting emails that were received, instead of sent.
Does anybody know how I can filter by received emails in gmail? All tips are welcome!
You could specify that you don't want mails coming from you, or mails having your sent label etc.
Which would result in the following request: