Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Remove duplicate emails from inbox?

(0) ShareShare
ReportReport
Posted on by 271

I have a problem I though Power Automate would be perfect for, but I can find any existing Flow solutions for it.

 

I receive many dozens of duplicate emails a day in my Outlook inbox as a result of being included on more than one distro list, and/or part of a "redirect" rule. This obviously clogs up my inbox and causes all kinds of headaches. Since I can't really control which distro lists or redirect rules I'm placed on, I was hoping there was a way to have a rule that when an email arrives, it checks my inbox and if that email already exists, it deletes the new one (or sends it to a subfolder, etc.).

 

Is this even theoretically possible with PA?

  • takolota1 Profile Picture
    4,882 Super User 2025 Season 1 on at
    Re: Remove duplicate emails from inbox?

    @grandMA @ScottShearer 

     

    If someone wanted to run things on a schedule & check for duplicate emails in given batches, then you could try altering this template for removing duplicates from a JSON array based on selected columns: https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Find-and-Remove-Duplicates/m-p/2191403#M1611

  • grandMA Profile Picture
    2 on at
    Re: Remove duplicate emails from inbox?

    Hello Scott,

    "Clean Up" only works for his own mailbox. I need a automatic solution for shared mailboxes. Have anyone solved the issue already?

  • ScottShearer Profile Picture
    25,228 Most Valuable Professional on at
    Re: Remove duplicate emails from inbox?

    I suggest using the built-in Outlook Clean Up function.  On the Home ribbon, click on Clean-up and select Folder or Folder and Subfolders.

    image.png

  • dororeich Profile Picture
    3 on at
    Re: Remove duplicate emails from inbox?

    Have you solved your issue already? I am looking for a similar flow that deletes my duplicate emails

  • jowe1989 Profile Picture
    2 on at
    Re: Remove duplicate emails from inbox?

    Hi Scott

    I tried it too and it is like Marcus said. It always delete all mails and not just the duplicated ones. I didnt found any solution to handle it.

    Best regards

  • MarcusD1 Profile Picture
    271 on at
    Re: Remove duplicate emails from inbox?

    Yeah... I've certainly done that before (caused damage and/or created a lot of clean up for myself). 😁 But minimal impact so far this time.

     

    Here's my screen shots:

    MarcusD1_3-1637616611436.png

     

    MarcusD1_2-1637616533754.png

    The full text of the expression is: 

    length(outputs('Get_emails_(V3)')?['body/value'])

     

    MarcusD1_1-1637616476146.png

     

    ... and thank you for your continued help with this Scott. I just signed up for a "How to Use Flow Expressions" course on Udemy, but I'm not there yet.

  • ScottShearer Profile Picture
    25,228 Most Valuable Professional on at
    Re: Remove duplicate emails from inbox?

    @MarcusD1 

    First, turn off your Flow so that it doesn't do any damage or cause you work.

    Then, please post a screen shot of the Flow.

     

     

  • MarcusD1 Profile Picture
    271 on at
    Re: Remove duplicate emails from inbox?

    I fixed the expression, but now it's applying it to every email. My "If yes" action was set to move the duplicate into a sub-folder (or at least that was my intention), but since making the edit to the expression, every email is being moved into the sub-folder. Unfortunately, given the week, I haven't received any duplicates yet since making the correction - so I'm not sure yet how those are behaving.

  • ScottShearer Profile Picture
    25,228 Most Valuable Professional on at
    Re: Remove duplicate emails from inbox?

    @MarcusD1 

    Your expression should reference body/value rather than body.  You should have selected Value rather than Body from Dynamic properties.

    image.png

  • MarcusD1 Profile Picture
    271 on at
    Re: Remove duplicate emails from inbox?

    I implemented this and let it run over the weekend. It's failing in the Conditional. Doesn't like the logic expression.

     

    MarcusD1_0-1637601817961.png

     

    This is the expression I have in the Condition:

    length(outputs('Get_emails_(V3)')?['body'])

    MarcusD1_1-1637601937313.png

     

    Did I typo something?

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492