How to ignore reply and forward mail message and take only the first mail

Hi, I need to get only first mail by use condition item.From.Address.Contains(“@xxxx.com”) and I need ignore all the other reply and forwards. Could you help me build this?

Whenever you get any reply, normally, you get Re: < Mail Subject > format.
One of the simpler solutions can be to check the subject line which does not start with Re: and has the required subject line.

Hi @Janjira_Tongdee

Welcome to our community!

Use get outlook mail message activity to retrieve the mails, in properties add filter condition as below,

Use for each loop to loop through the mails, inside for each put an if activity and provide the below condition,

item.From.Address.Contains(“@xxx.com”) And Not (item.Subject.ToUpper.Contains(“RE:”) or item.Subject.ToUpper.Contains(“FW:”))

Thank you for reply, but I can’t check subject RE: because RE is removed from the subject.

Try to filter the emails in the filter section.

Example:

More details here: