Filter the outlook/exchange with subject and sender address? preferably Exchange

I want to filter the mail’s inbox via subject and sender address in exchange/outlook?
Subject: Incident Number: INC123456 has been Created
SenderAddress: notify@abc.com

Subject which has created in subject and sender address is always constant.

Update1: I want to mail the filter in mail activity subject filter only n not later on
Update2: INC123456 can vary and we can’t include it in filtering criteria as well. So you can consider Incident Number: has been Created only this part as filtering criteria for subject.

Hi @anjasing

Try this Following

  1. Read the mails using Get Exchange mail activity and store in mails variable.
  2. Now use the below linq query using assign activity.
mails= mails.Where(Function(mail) mail.Subject.ToString.Contains(“Incident Number: INC123456 has been Created”)).ToList()

After the assign activity, mails variable will only contain the mail which had subject containing Incident Number: INC123456 has been Created in it.

For more needing look on it

Regards
Gokul

Hi, Sorry on my part. This incident number can vary and we can’t take it as variable also cz it can be anything.

Hi @anjasing

You can try with Filter Expression in the Properties panel

StringVal → INC123456

"[Subject] = 'Incident Number: "+StringVal.String.Trim+" has been Created"

Regards
Gokul

That’s what I mentioned in previous post…this INC number is variable and can’t be taken as variable also as frist step bot is doing is reading the mail so INC number is random. How to check mail with subject
“[Subject] = 'Incident Number: has been Created”

Hi @anjasing

Try without INC number in LINQ

We can take only Incident Number

mails= mails.Where(Function(mail) mail.Subject.ToString.Contains(“Incident Number”)).ToList()

Regards
Gokul