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 → “[Blah@bling.org]”
messages(0).Sender → [“Blah” Blah@bling.org]
messages(0).From-> [“Blah” Blah@bling.org]
In the activity’s “Filter” field for sender’s email address I’ve tried:
[Sender] = ‘Blah.bling.org’
[sender] = ‘blah.bling.org’
sender:blah.bling.org
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.
eg:
Subject contains “test” and sender email address is “blah@bling.org”
where an email from “blah@bling.org” with the subject is “This is a test” will be returned.
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
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. 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)??
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 ‘xyz@domain.com’ 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