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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to remove Duplicat...
Power Automate
Answered

How to remove Duplicate rows in a SharePoint list using Power Automate

(0) ShareShare
ReportReport
Posted on by 25

Ive searched through the solutions and none seem to be what im looking for, could be the way my flow is set up is wrong.

Essientally how the flow is i have 2 different sharepoint list and im taking specific columns from both and adding them into the 3rd list, (also any time a change is made or item is create it will also create item in 3rd list)

 

Padillam5_0-1641225680995.png

 

So im taking information from multiple columns and adding them to a single column in the 3rd ( all different contact cards).

 

 

 

The issue is if I edit one of the columns, it will proceed to readd each of the column in the row. Just need a way to either create another automation to remove duplicate rows, or maybe i need a different flow set up? Its working how i want it to as is, minus the duplicates.

Categories:
  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @Padillam5 ,

    based on the flow screenshot you always create new item, no matter what. I'd add a lookup to the 3rd list to check if the item already exists - the standard approach is to use 'Get items' on the 3rd list with a Filter Query to filter using the item unique identifier.

    Then check in a 'Condition' if the action return any items = if it found any item in the 3rd list. If it did, update the item using the returned ID, if it didn't create the item, as described here in more detail.

    For the existing duplicates I'd delete them manually, it's a one time task once you adjust the flow to update items instead of only creating them.

  • Padillam5 Profile Picture
    25 on at

    Ok this is something i figured id need to do just had no direction, thank you. Follow up question would i create this step prior to the parallels, or do i check against each parallel  

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    One more thing, your 'Apply to each' is added because the 'Managers' column is a multiple choice column. The flow wants to process the managers one by one, and for each of them it'll create a separate item - hence the 'Apply to each'. You can check the 3rd list to see that when you had multiple people in the 'Managers' you'll have as many items, one per manager. Get rid of the 'Apply to each', unless that's what you want to do.

    Add a 'Select' action right after the trigger and extract the emails of all the managers using a 'Select' action as described here.

    image.png

    The check if the item already exists should be in the parallel branches, right before the 'Create item':

    • 'Get items' to lookup the item
    • 'Condition' to check if it was found
      • If found - 'Update item'
      • If not found - 'Create item'
  • Padillam5 Profile Picture
    25 on at

    So it creating an item for each is exactly how it is functioning now, and is how i intended it to be. List 1 is Branch X of a company with mutiple shifts managers seperated by shift ( exp: Shift Manager Day : Shift Manager Mid : Shift Manager Night) and list 2 is just another branch set up exactly the same way.

     

    List three takes all 6 columns ( 3 and 3) and combine them into a single column called Mangers.

    Padillam5_0-1641232842416.png

    so it is adding managers correctly. but as you see in the red, some managers are at multiple sites so appear twice

    . Following the article you posted, i have it filtered out by column and if Claim is eq to Claim coming in. But im getting a bunch of request errors, or expression errors, im assuming the filter function eq does not work well with Claim 

  • Padillam5 Profile Picture
    25 on at

    here is how i have it written out 

     

    Padillam5_1-1641233103361.png

     

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @Padillam5 ,

    the Filter Query has a fixed format and it always uses internal name of the column on the site.

    Column_Internal_Name <operator> 'Value'

    when working with people picker column it contains a whole object with the person, but you want to take only one piece of information, e.g. the email address. It must be EMail with capital E and M.

    Person/EMail eq 'person@company.com'

    In your situation it should be the column internal name/EMail on one side, without quotes, equals, dynamic content representing the email of the currently processed user.

    Day_site_supervisor/EMail eq 'Day Site Supervisor email dynamic content'

     

  • Padillam5 Profile Picture
    25 on at

    I was not the one who originally created the list, this helped a lot the columns were originally arbitrary names

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard