Get Outlook Mail Messages - Compound Filter Condition

Hi,

Trying to filter messages from a specific sender with a subject containing specific text. I tried the below option but no results fetched. While each condition gives results, but the combo does not.

“[SenderName] = ‘xxxxxx’ AND @SQL=urn:schemas:httpmail:subject like ‘%YYYYYY%’”

Any clue will be helpful.

Thank you,
Hari

@HKP

Please try this

"@SQL=urn:schemas:httpmail:fromemail LIKE '%xyz@gmail.com%' AND urn:schemas:httpmail:subject like '%YYYYYY%'"

or

"@SQL=""urn:schemas:httpmail:fromemail"" LIKE '%xyz@gmail.com%' AND ""urn:schemas:httpmail:subject"" like '%YYYYYY%'"

cheers

Hi @HKP

Use the below filter expression.

"[From] = 'sender@example.com' AND [Subject] LIKE '%specific_text%'"

Or you can check the below thread.

Hope it helps!!

Both of them did not work. They did not give any error also.

https://docs.uipath.com/activities/other/latest/productivity/get-outlook-mail-messages

I am using the above documentation page to work on the filter mechanism. In this one, From contains only a name and not email address. When your filter condition is specified, I get the error as - Get Outlook Mail Messages: Condition is not valid.

I have just started learning using UiPath Studio X. I tried using if condition and it works for subject of email, but not sender email address. Really don’t know why? Pls help.