Hey community,
I’m trying to figure out two things with the Get Outlook Mail Message filter option.
I am trying to achieve to grab the first message that matches the following criteria:
- The subject contains a particular phrase ex. ABC
- The e-mail comes from someone from my company’s domain or from a particular e-mail address the client’s domain
Optionally:
- I would also like to look for a particular e-mail address in the message body as the e-mail that i want to get is a forward
- I would like the subject to match a pattern instead of just a substring, I would like something like subject is %ABC/%/% but it didn’t work. Is there a way to do it or my best bet is to iterate through messages and look for a regex match in subject?
Some of the filters I tried in the Outlook filter query builder and they did filter correctly in Outlook but Uipath just ignores it. Is there some gimmick or a mistake in the filter that I am not noticing?
An example filter I tried, some parentheses might be missing here, but in code it was supposedly okay because I wasn’t getting an exception, just the filter caught nothing. When I made smaller filters they seemed to worked but when I started combining them they won’t match any message.
“@SQL=(urn:schemas:httpmail:subject LIKE ‘%ABC%’ AND (urn:schemas:httpmail:fromemail LIKE ‘%@mycompany.xyz%’ OR urn:schemas:httpmail:fromemail LIKE ‘something@clientcompany.xyz’) AND (urn:schemas:httpmail:textdescription LIKE ‘%forwardedemail@forwardeddomain.xyz%’))”