Outlook Filter same email subject and keep latest only

Hi everyone ,

i have been wondering if we can somehow filter the email on a folder ,
so it will move redundant email with same subject and keep only the latest one regardless of the sender.
example :
5 email with subject "this is reduntant email " from 5 people.
and i want to only keep the latest one regardless of email sender.

can we do this automatically by outlook rules or maybe by robot ?

please share ur opinion and maybe suggestion , a demo file will be much appreciated!

thanks

@Ahmad_Rais

You can do it by using outlook activities.follow the steps

  1. Get outlook mail messages (if you know the subject add filters else get all)
  2. Use this in assign to get all distinct subjects Distinct subjects = Listofmails.select(function(x) x.Subject).Distinct.ToArray()
  3. Now loop through the array of subjects and chnage type argument to string(item)
  4. Now use assign requiredemails = listofmails.Where(function(x) x.Subject.Equals(item)).ToArray). this will give all emails with required subject.
  5. Now use a loop to loop through each email and inside us if condition to ignore the fist email… index.count = 0 (index is the property of for loop,check in properties panel)
  6. In else condition use move email and it would move all the emails with duplicate subject

Cheers

thanks for the suggestion i will note this one!
if i it works i will inform !

thanks

1 Like

Hi , Comennting if anyone have more suggestion for this question

thanks!

@Ahmad_Rais

Had any issues with the provided approach?

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.