How to retrieve Emails within specific time range

How to retrieve email within specific timeline
For example I want to retrieve all emails which came between 9am to 6pm.

6pm email (last email for day) will have specific sub as indicator saying that this is the last email for the day. All emails after this email we should consider as next day emails.

.xaml would be helpful.
Thanks in advance!!

#help #question #email #email-automation

Hi @Tate_S,

This topic should help. Microsoft Office 365 - Get Mail Activity Queries to filter returned emails


1 Like

Hi @Tate_S ,
you can use the filter option in get outlook mail message.
below filter will be retrieve all the mails from 9AM to 6PM for yesterday.
"[Received] >= '" + DateTime.Today.AddDays(-1).ToString("d") + " 09:00AM' AND [Received] < '"+ DateTime.Today.AddDays(-1).ToString("d") + " 06:00PM'"


I’m getting error on Credentials are invalid.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.