Help with Get Outlook Mail Messages activity

I am unable to get any result once i apply this filter condition - “[SenderEmailAddress] = ‘’”, is there any mistake?", there are already emails in my inbox but it doesnt yield any result. Thanks!

Hi @bhanupsharma

In sometimes the filter option in get outlook mail message activity was not working. The expression you have provided is correct but the function is not working properly.

There is other way to check the condition of the mail,
→ Use get outlook mail message activity to retrieve all mails from Outlook it stored all details in List<MailMessage> datatype variable.
→ After get outlook use for each activity to iterate mails in collection variable.
→ Inside for each insert if condition to check the sender mail address, if the condition gets true insert the activities in then block among your process if condition is false it will go to else block.


Check the below workflow for better understanding,

Hope it helps!!

Hi @bhanupsharma

We can filter using linq instead, here is the example

(From m In mailMessags
Where m.SenderEmailAddress.Trim().ToLower().Equals("")
Select m).ToList()


1 Like

Hey @bhanupsharma
Please read this documentation:

Here you will find examples how to use filtering:

1 Like

You can also use SQL query like this:

Thank you for the reply but may i know why this expression does not work - “[SenderEmailAddress] = ‘’”


Thanks, but still am not getting any result with this expression - “(urn:schemas:httpmail:fromemail LIKE ‘’)”

even this expression does not give me any result - “[SenderEmailAddress] = ‘’”

but when I try this expression - “[From] = ‘FirstName LastName’” it works.


Have you checked this post @bhanupsharma