Get Mail Activity in Microsoft 365, want Query Filter based on Date

Hey Programmer,

     As my task is to be,

I have received mail on daily basis and I want to trigger the flow for every one hour.
As per the daily mail, How do I fetch the mail received date and time and filter/Processed only the today mails only day by day on hourly basis.

I have used the get mail Activity and want the query to filter the today received mails.

Cheers!

@Iswarya_P1

“[ReceivedTime] >= '” + DateTime.Today.ToString(“MM/dd/yyyy”) + “'”

Hi @Iswarya_P1

In the properties of the “Get Mail” activity, find the “Filter” property and click on the “Edit” button.

"[ReceivedTime] >= '" + DateTime.Today.ToString("yyyy-MM-dd") + "' AND [ReceivedTime] < '" + DateTime.Today.AddDays(1).ToString("yyyy-MM-dd") + "'"

Hope it helps!!

I have already tried this filter, it shows an bad request error.

Now, I am using this format "ReceivedDateTime ge "+DateTime.Now.ToString(“yyyy-MM-dd”). This is working fine.

@Iswarya_P1

“[ReceivedTime] >= '” + DateTime.Now.AddHours(-1).ToString(“MM/dd/yyyy HH:mm:ss”) + “’ AND [ReceivedTime] <= '” + DateTime.Now.ToString(“MM/dd/yyyy HH:mm:ss”) + “'”