In the loop where you’re going through the emails, you can do the following to check:
Emails with attachment: CurrentMail.Attachments.Count > 0
Emails without attachment AND received date is less than 3 days: CurrentMail.Attachments.Count = 0 And (Now.Date - CurrentMail.DateAsDateTime.Date).Days < 3)
Hi @yikwen.goo . Before I get into the loop to process the emails I want to determine if there are any to process. I want to count the number of emails in the folder that meet the criteria and then process if the number is greater then zero. Is there a way to determine the number of emails before I get into the loop?
These are the filters when you use get outlook mail messages…as you are using outlook 365 …try this in the get mail activity properties filter option
"HasAttachments eq true" - for attachments
"hasAttachments eq false and receivedDateTime ge " + Now.Adddays(-3).ToString