Get Outlook Mail Message: need "sender" filter and multiple filter samples

Hi everyone,

I’ve had no luck trying to filter based on the sender’s email address or multiple filters and I’ve wasted so much time trying different examples and searching for solutions.

Note: I’ve run the activity with no filters and I get all the emails in the folder.

Looking at one of the emails, I get:
messages(0).SenderEmailAddress → “[]”
messages(0).Sender → [“Blah”]
messages(0).From-> [“Blah”]

In the activity’s “Filter” field for sender’s email address I’ve tried:
[Sender] = ‘
[sender] = ‘
sender:blah (Note: this format works for searching by subject)
[Sender] = ‘blah’
[sender] = ‘blah’
The same as above using SenderEmailAddress as well as From

Can anyone provide me with a definitive working example of filtering by the sender’s email address? I need to do it within the activity instead of getting all the emails and looping through them.

Secondly, I’m looking for an example of multiple filters. Following on the above, I’m looking for a definitive working example will filter by both the sender AND the subject. I need to do it within the activity instead of getting all the emails and looping through them.

Subject contains “test” and sender email address is “
where an email from “” with the subject is “This is a test” will be returned.

Thank you

Hi @carlor - Could you please try this…

“@SQL=”“”" like ‘Your Search String’ AND urn:schemas:httpmail:fromemail = ‘Your From Email Address’"

Tested Pattern:

“@SQL=”“”" like ‘%Your Daily Digest%’ AND urn:schemas:httpmail:fromemail = ‘’"

Tested Result:


Note: When you copy paste Single and Double quotes will change to regular ones, so you have to modify it to Straight Single quote and Straight double quotes

1 Like

Hi @carlor
In addition to what @prasath17 said.

Try this way to filter mails by linq query

Like in get outlook mail activity store the output of this activity in mail_list variable which store the list of all mail messages in the outlook

now use the below assign activity for performing the linq query

mail_list=mail_list.Where(Function(mail) mail.Subject.Contains(your word) And mail.SenderEmailAddress.Equals(mailaddress) ).ToList

where your word and mailaddress are the the data by which u need to filter the data.

by this u can able to filter too.

Check this workflow for your reference

Main.xaml (7.4 KB)

Hope it helps you


Nived N

Happy Automation


Thank you for your example, but I need to be able to do the filtering within the Get Mail activity.

I’m having trouble with your sample. It could be the quotes, as you mentioned, but I haven’t been able to get the proper syntax. I keep getting an error. Could you include your xaml?

Thank you,


@carlor - Here you go (36.8 KB)

Thank you. That helped a BIT. Using the complete filter doesn’t work. I stripped out the email part of the filter and I managed results. I stripped out the subject part and left the email but no results were returned. I changed the ‘=’ to a ‘like’ with the email and that didn’t work. I then used ‘like’ with just ‘%Carlo%’ and I managed to get results.

Unfortunately, I need to be able to specify a complete email address. Any thoughts on what might be going on here? If I look at the From field for a returned email, it shows “Carlo Robazza <Carlo.Robazza@…>”



@carlor - Sorry I am not following you. The example which I gave I had the complete email address and it is working well. Can you please share your filter (after hiding PII information)??

This is my filter:
“@SQL=”“”" like ‘%test%’ AND urn:schemas:httpmail:fromemail = ‘’"

And this is a screenshot of the activity.

Hi @prasath17 @NIVED_NAMBIAR

I am stuck with similar scenario where I need to add filters in Get Mail activity for multiple senders and Sender email address are in Config file.

My current filter is from/emailAddress/address eq ‘’ which is returning unread email count. However if I Change the above filter to read email for multiple sender from config file below filter is not working

from/emailAddress/address eq ‘"+Config(eMailFrom).ToString+"’"

Can you help?