Read emails only from a particular person

Hi Friends,

I want to read emails from only a particular person with subject line.

for ex : - Person A - if person A which is authorized person sends email with a particular subject line (ex : Automation_ProcessName ) then bot should read emails.

Person B - if person B which is not authorized person sends email with a same subject line (ex : Automation_ProcessName ) then bot should not read that emails.
So how we can achieve this.


create var: str_AuthorizedMail = “

use get outlook mail messages and in filter option use:

“@SQL=(”+Chr(34)+“"+Chr(34)+" like '%”+str_AuthorizedMail+"%’)"

and for two options (mail address and subject):

str_AuthorizedMail = “
str_Subject = “Automation_ProcessName”

“@SQL=(”+Chr(34)+“"+Chr(34)+" like '%”+str_AuthorizedMail +"%’) AND urn:schemas:httpmail:subject like ‘%"+str_Subject+"%’"


You can simply use the filter condition in the properties of Outlook Mail Message Activity while getting emails from the mailbox.

Set the filter to read the emails using
You can variablize the passing of the persons email too.

Hi @Rup_1

after getting the mails from get outlook mails activity and store output in mails variable

you can use the assign activity for filtering the mails

From = “
Subject = “Automation_ProcessName”

mails = mails.Where(Function(mail) mail.From.ToString.Equals(From) And mail.Subject.ToString.Equals(Subject)).ToList

You will get only filtered mails as per ur requirement

Hope the idea helps you


Nived N

Happy Automation