Adding multiple filters to the Get Outlook Mail Message Activity

So I wish to filter the mails from my outlook mailbox based on two properties:

  1. Subject
  2. Category

I want to filter the subject filter by a wildcard and I want to retrieve mails only without the category.

I’ve tried the following, none of which seems to work

"@SQL=urn:schemas:httpmail:subject like '%Course Invoices%' AND urn:schemas:httpmail:category NOT LIKE '%yearly%'" 

– throws an error: “Get Outlook Mail Messages: Cannot parse condition. Error at “@SQL=urn:schemas:httpmail:subject like '…”.”

"@SQL=urn:schemas:httpmail:subject like '%Course Invoices%' AND urn:schemas:httpmail:category <> 'Automation'"

– doesn’t throw any errors, but it also retrieves mails with the category having ‘Automation’

I’d love some help on this, also is it possible to combine [Categories] tag with the above SQL condition, if yes, how?

I have not tried this, but I read another post with a simular problem. Could you try:

“@SQL=urn:schemas:httpmail:subject like ‘%Course Invoices%’ AND NOT (urn:schemas:httpmail:category LIKE ‘%yearly%’)”

Hi, no this doesn’t seem to be working for me either. I tried both solutions, the one you’ve shared as well as the one in the solution you’ve tagged

Did some digging around and finally got it to work.

"@SQL=urn:schemas-microsoft-com:office:office#Keywords <> 'Yearly' AND urn:schemas:httpmail:subject LIKE '%Course Invoices%'"

This seems to be working for me.
From here:
and then to here

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