Not able to find correct filter format for get outlook mail message activity

Hi All,

My filter format is mentioned below
“[ReceivedTime] >= ‘”+now.Date.AddHours(-24).ToShortTimeString+"’ AND ([From] =‘Parthasarathy, Shyam’ OR [From] = ‘Bhattacharya, Sayantan’)"

The above was working fine. but i want to replace the name with a dictionary variable. so i tried with below.

“[ReceivedTime] >= ‘”+now.Date.AddHours(-24).ToShortTimeString+"’ AND ([From] = “+Config(“EmailFilter”).ToString+” OR [From] = ‘Bhattacharya, Sayantan’)"

config is dictionary variable and emailfilter is my key for my value.

This shows condition is invalid error. Please help me to sort this out.


1 Like

@Automation_Shyam Are you sure this was working fine, and was able to get you the proper filtered mails ?

1 Like

Yes bro


Most probably your from name have changed or might have extra space.

Try to print and compare your from value coming from mail message without filtering.