Get outlook mail message - filter by category


I’m trying to filter the emails I get from the ‘Get Outlook Mail Message’ activity, and I only want to get the emails that DON’T have a certain color category.

I’ve seen on this forum that we can use “[categories]=‘Red category’” to only get emails that have the red category.

However, when I use <> (not equal) instead of =, it doesn’t work.

Has anyone ever delt with this issue?

Thank you.

1 Like

@karim.aldandachi - Please try below

“@SQL=Not (urn:schemas:httpmail:categories Like ‘%Red%’)”


“@SQL=Not (urn:schemas:mailheader:keywords Like ‘%Red%’)”


Where do I type this? In the ‘Filter’ field?

Yes in filter

Hmm it doesn’t work. There is an error in the expression I think.

hi @karim.aldandachi @SQL=Not (urn:schemas:mailheader:keywords Like ‘%Red%’)” this worked for me…

1 Like

@karim.aldandachi - i used those 2 expressions in different scenarios… both will work fine…
pls revisit/type your filter expression maybe there could be an extra space or double quotes.

1 Like