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.

Regards,

create var: str_AuthorizedMail = “xyz@xyz.com

use get outlook mail messages and in filter option use:

“@SQL=(”+Chr(34)+“http://schemas.microsoft.com/mapi/proptag/0x007D001E"+Chr(34)+" like '%”+str_AuthorizedMail+"%’)"

and for two options (mail address and subject):

str_AuthorizedMail = “xyz@xyz.com
str_Subject = “Automation_ProcessName”

“@SQL=(”+Chr(34)+“http://schemas.microsoft.com/mapi/proptag/0x007D001E"+Chr(34)+" like '%”+str_AuthorizedMail +"%’) AND urn:schemas:httpmail:subject like ‘%"+str_Subject+"%’"

@Rup_1

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
From:“xyz@domain”
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

consider
From = “xyz.rpa@gmail.com
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

Regards,

Nived N

Happy Automation