web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Deleting duplicates in...
Power Automate
Unanswered

Deleting duplicates in SharePoint list

(0) ShareShare
ReportReport
Posted on by 10

I have a flow that would create duplicate items in a SharePoint list. There could be 2, 3, or 4 of the same item after each approval process depending on the number of approvers for that flow.

 

I would like to create a new flow that would check for duplicate items and remove them, retaining only 1 item in that list.

 

Hope someone could guide me how to achieve this. Thanks very much!

Categories:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,852 Most Valuable Professional on at
    Re: Deleting duplicates in SharePoint list

    Hi @force_field 

     

    Try the following:

     

    Use trigger as 'When ever an item is created'. Then use 'Get Items' filtered by Title or your specified identifier. Then add next action step as IF condition to check the count of the result is greater than one. Use the below expression

     

    length(body('Get_items')?['value'])
     
    Next add a for each loop to iterate all the list values.
     
    Again add another IF condition to check the created date is not equal to newly created record (map the created date from the trigger). This way it won't delete all the records except the latest created.
     
    Finally use the Delete Item to delete the duplicates.
     
    Thanks
  • Jay-Encodian Profile Picture
    2,920 on at
    Re: Deleting duplicates in SharePoint list

    Hey @force_field 

    The best option here is not to create the duplicates in the first instance... then you don't need to create another Flow to delete them 🙂

    I'd suggest adding a SharePoint 'Get Items' action to check whether an existing item exists... and only create a new item if an item doesn't exist.

    HTH

    Jay

  • v-alzhan-msft Profile Picture
    on at
    Re: Deleting duplicates in SharePoint list

    Hi @force_field ,

     

    Could you please share a screenshot of the sharepoint list items?

    Does the duplicates list items has the same title? And does the title of the list item would always unique?

     

    Best regards,
    Alice       
     
    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Dhaval2002p Profile Picture
    103 on at
    Re: Deleting duplicates in SharePoint list

    @abm 

    Hello, Need workflow help.

    Task: Find a Duplicate item from List B and change the status column value to a Duplicate item
    We receive work from List A to List B
    I work on List B. I created a Choice column called status- and I added choices of New item, Duplicate item, completed, and Under review.

    Sometimes we receive duplicate items in List B from List A, I would like to identify those duplicates every time when a new item is created in List B and I want to change the status to Duplicate item if the manufacturer’s part number is matching.

  • abm abm Profile Picture
    32,852 Most Valuable Professional on at
    Re: Deleting duplicates in SharePoint list

    Hi @Dhaval2002p 

     

    Could you please create a new thread for this please?

     

    Thanks

  • Dhaval2002p Profile Picture
    103 on at
  • Dhaval2002p Profile Picture
    103 on at
    Re: Deleting duplicates in SharePoint list

    I created

  • trugita Profile Picture
    2 on at
    Re: Deleting duplicates in SharePoint list

    Hey Jay - I know this is super old, but any chance you can go through the process here?  I'm cool with using "Get Items" action to check for existing items, but not clear on how to only create a new item if an item doesn't exist.

     

    Thank!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard