Filter outlook mail

Hi,
How to filter outlook mails by subject = complete and received date= today

In subject , complete is fixed keyword. Their can be any word before or after. So have to use “like”

I want to use filter property of get outlook mail message

Hi @TUSHAR_DIWASE

Kindly refer my below solution

Hope this might help you

For recieved time/date sample syntax

" [ReceivedTime] >= ‘02/23/2022’ AND [ReceivedTime] <= ‘02/25/2022’ "

One more method by not use filter property

Use get outlook message activity

Drag a for each activity

So for each. Item in mail message

Put a if condition with statement below

Item.subject.contains(“Complete”)

Then do your desired step
Else. Skip

Thanks

@TUSHAR_DIWASE

Try this

Sorry bu not working

Thanks but it is not giving any filter mail eventhough their is mail for today date

@TUSHAR_DIWASE
let me provide you a sample code

1 Like

Sequence.zip (1.9 KB)

Hi @TUSHAR_DIWASE

hope that helps

hI @TUSHAR_DIWASE

Check out this thread

Regards
Gokul

@Gokul001 ,thank but i am looking to use filter property to filter mail based on today date and subject

@nikhil.girish thanks for the reply. Can we use filter property to achieve the same.
filter based on received date= today and subject=“Complete”

yes we can @TUSHAR_DIWASE

but did tht code serve your purpose

yes. indeed. but i am looking to achieve this using filter property

1 Like

Then try this filter
“@SQL=%today(urn:schemas:httpmail:datereceived)% AND urn:schemas:httpmail:subject Like '%” Complete"%'"

Hope this Helps

Regards
Gokul


Getting error

try this one

“@SQL=%today(urn:schemas:httpmail:datereceived)% AND urn:schemas:httpmail:subject Like ‘%Complete%’”

Regards
Gokul

thanks but getting error -Get Outlook Mail Messages: Cannot parse condition. Error at “@SQL=((%today(urn:schemas:httpmail:dater…”.

I suggest you to better go with this approach shared earlier via code rather than trying to filter in activity itself , to avoid any issues @TUSHAR_DIWASE

Okay this one

“”"@SQL=urn:schemas:httpmail:subject Like ‘%Complete%’ and [Received] >= " + DateTime.Today.ToString(“Your Path “)+””

Regards
Gokul