Filter in Get Outlook mail message

Hi,

I want to filter and get Outlook messages. I want to use for Not equals for Subject.
I tried using this “[SUBJECT] <>”+excelSubj.ToString.

But showing me error ": “Get Outlook Mail Messages: Cannot parse condition. Error at "Tricks".”,

Could you please help me out.
Thanks…

2 Likes

Try like this When you reading the mail messages you will get list right so loop through the list and then for each mail to get the subject mail.subject.tolower.tosting you will get subject right right store it in one string variable and then compared using string_varible.Equals(you string) if it is same it will return true other wise false

1 Like

Ok…Thanks for ur quick response let me try this way…

Hey @Snehamayi_Sneha,

You can use the expression below:

@SQL= (““urn:schemas:httpmail:subject”” Like ‘%“+excelSubj.ToString+”%’)

This should go inside Filter property in get outlook mail message as string.

Hey ,
I have used this way…Please correct me.

“@SQL= (”“urn:schemas:httpmail:subject”" Like‘%“+excelSubj.ToString+”%’)"

try this as it is.

Is this filter for not equals… I just i want to filter with my excel subject to email subject if it matches then Getmail outlook message should not fetch those. If it doesnot matches then it should fetch that. This is my scenario.
\i need to add a filter in filter option.please suggest.

“@SQL= (”“urn:schemas:httpmail:subject”" NOT Like‘%“+excelSubj.ToString+”%’)"
Use this and let me know if it is working or not.

image

getting this error

“@SQL= (”“urn:schemas:httpmail:subject”" NOT Like ‘%“+excelSubj.ToString+”%’ )"
Check this i did a little correction.

@Snehamayi_Sneha Please Check below filter option.

 “[SUBJECT] <>'”+excelSubj.ToString+"'"

Welcome… :grinning: did that worked or still facing issue

it is always coming as true the condition

image

Again error

can you attach your work flow.It is working for me.Let me check.

OK SURE

no it is always going to true… condition
My scenario is:

  1. First time i read all the Get Outlook mail messages
  2. Then i am putting all my unreadmails to excel with subject and datentime.
  3. Then i used delay at that time i send a new mail to my email then i m using again get mail messages to compare with my excel subject with the new arrived mail if it is not there in excel it will add otherwise not .
    So just want to filter that condition.

Main.xaml (44.6 KB)

In the flowchart please check activity 2ndcheck Mail Message in that getoutlook mail message i m trying to implement

I am trying this also it also not working.It is reading all the unread mails.
I want to filter and get the unreadmails which is not there in my excel

Hey @Snehamayi_Sneha,

I did some modification on your xaml. Can you check now?
Main.xaml (53.2 KB)