Error on "Get Outlook mail message" activity

Hello Forum
I have an error when using “Get Outlook mail message” activity

I want to filter on outlook : unread message, having an excel files ( .xlsx, xls and csv) and email having a red category

for that , i am using filter options (please look at the picture:)

For filtering those are my options

“@SQL= ““urn:schemas:httpmail:hasattachment”” = true AND ( ““urn:schemas:httpmail:attachmentfilename”” LIKE ‘%.xlsx’ OR ““urn:schemas:httpmail:attachmentfilename”” LIKE ‘%.xls’ OR ““urn:schemas:httpmail:attachmentfilename”” LIKE ‘%.csv’ ) AND ““urn:schemas:httpmail:category”” = ‘red’”

and as for sure i selected “Only unread” message.

My outlook has just 4 unread message. More over, from those 4 emails i just have one with subject string "ATCP).

Capture10

So that my results in output pannel should show just 4 returns (3 incorrect and 1correct .). However , i realised that the program is going through all the messages . Please look at the picture below
Capture8

i would really appreciated if you could help me to find the mistake or reason why it is not working as expected,
Thanks,
Ricardo

@Ricchch

Try below URN as well and remove the Only Unread message property

@SQL= "urn:schemas:httpmail:hasattachment" = true 
    AND ("urn:schemas:httpmail:attachmentfilename" LIKE '%.xlsx' OR "urn:schemas:httpmail:attachmentfilename" LIKE '%.xls' OR "urn:schemas:httpmail:attachmentfilename" LIKE '%.csv') 
    AND "urn:schemas:httpmail:category" = 'red'
    AND "urn:schemas:httpmail:read" = false

Hope this may help you

Thanks,
Srini

Hello @Srini84,
thanks for helping.

i added the portion but i have a mistake

Thanks for helping
Ricardo

@Ricchch

Sorry I missed the quotation marks, check below


"@SQL= ""urn:schemas:httpmail:hasattachment"" = True 
    And (""urn:schemas:httpmail:attachmentfilename"" Like '%.xlsx' OR ""urn:schemas:httpmail:attachmentfilename"" LIKE '%.xls' OR ""urn:schemas:httpmail:attachmentfilename"" LIKE '%.csv') 
    And ""urn:schemas:httpmail:category"" = 'red'
    And ""urn:schemas:httpmail:read"" = False"

Hope this may help you

Thanks,
Srini

Hello @Srini84,
I added , but i changed the position . The red alert dissapeared. But it still not working (it goes through read and unread mails)

@Ricchch

Can you enable now the UnRead message enable maybe it will filter else

You can try on the below as well, place the double quotes where is required

@SQL= "urn:schemas:httpmail:hasattachment" = true 
    AND ("urn:schemas:httpmail:attachmentfilename" LIKE '%.xlsx' OR "urn:schemas:httpmail:attachmentfilename" LIKE '%.xls' OR "urn:schemas:httpmail:attachmentfilename" LIKE '%.csv') 
    AND "urn:schemas:httpmail:category" = 'red'
    AND NOT "urn:schemas:httpmail:read"

Thanks,
Srini