How to filter by the current month with the Get Outlook Mail Messages activity

Hello people,
How to filter only emails from the current month with the Get Outlook Mail Messages activity.
Can anyone help me with this?
Thank you.

Use this in the filter it will give you the mails of current month

“[ReceivedTime] > '” + now.AddMonths(-1).tostring(“MM/dd/yyyy”) + “'”

Hope it will work

Hi @Romario_Almeida,

Try this below code

"[ReceivedTime] >= ’ " +now.Month+ " ’ "

Thanks
Neelima.

Hello @ghazanfar and @1996

Hello Ghazanfar
Thanks for the help, but I think it didn’t work very well, I only have 4 emails as unread and even so in the message box is coming 100, take a look at the attached image.

@Romario_Almeida, As per my understanding your checking mail count but in properties you have mentioned as top 100.So, Instead of Top 100 can you change as 4.Hope this helps you.

Thanks!

I have tested the code in my machine it is working fine. It does not matter how much value you enter into unread email count. see the below code and let me know in case of issue

Use this workflowEmail.xaml (4.8 KB)

Hi @ghazanfar

This solution worked, thank you very much.

Welcome :slight_smile:

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