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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Flow to...
Power Automate
Suggested Answer

Power Automate Flow to Sync and Update SharePoint Lists Without Duplicates

(0) ShareShare
ReportReport
Posted on by 4
 I need assistance with creating a Power Automate flow to sync two SharePoint lists (EmployeeDetails and ContractorDetails) with a third list (CombinedList). The requirement is as follows:
Lists Involved:
EmployeeDetails: Contains columns Employee ID (unique identifier), Name, Department, and Status.
ContractorDetails : Contains the same columns as EmployeeDetails.
CombinedList:  A target list with the same columns (Employee ID, Name, Department, Status).
Requirement:
When a new item is created in either EmployeeDetails or ContractorDetails, the item should be added to CombinedList with all column values (Employee ID, Name, Department, Status).
When an existing item is edited in EmployeeDetails or ContractorDetails, the corresponding item in CombinedList (matched by Employee ID) should be updated with the new values, instead of creating a duplicate entry.
The flow should be efficient for large lists to avoid server overload.
 
Right Now, I have merged the 2 lists into CombinedList using the following steps:
 
Step 1: Check the structure of both lists
  1. Open Microsoft Lists from Microsoft Lists App or from your SharePoint site.
  1. Ensure that both lists have the same column names and data types.
Example:
List 1 (EmployeeDetails)
Employee ID (Number)
Name (Text)
Department (Choice)
 
 
List 2 (ContractorDetails)
Employee ID (Number)
Name (Text)
Department (Choice)
 
 
If they have different column names, rename them or create matching columns in the new Combined List.
 
Step 2: Create the "Combined List"
Go to Microsoft Lists > Create New List.
Select Blank List and name it "Combined List".
Add the same columns as List 1 and List 2.
 
Step 3: Open Power Automate
Go to Power Automate
Sign in with your Microsoft account.
Click on "Create" (left panel).
Select "Instant cloud flow" (this is an alternative to "Recurrence").
In the pop-up:
Enter a Flow Name: Merge Employee and Contractor Lists
Select Manually trigger a flow (this means you will run the flow manually).
Click Create.
 
Step 4: Get Data from First List
  1. Click on + New step.
  2. Search for "Get items" and select "Get items (SharePoint)".
  3. Configure the settings:
    • Site Address: Select your SharePoint site.
    • List Name: Select List 1 (e.g., EmployeeDetails).
 
 
Step 5: Add an Action to Create Items in CombinedList:
  • Click + New step.
  • Search for Create item and select Create item under SharePoint.
  • Configure it:
    • Site Address: Same as above (select your SharePoint site).
    • List Name: Select CombinedList.
    • Employee ID: Click the field, then in the Dynamic content pop-up, select Employee ID from the Get items action.
    • Name: Select Name from the Get items action.
    • Department: Select Department from the Get items action.
 
Wrap It in an Apply to Each Loop:
  • Power Automate needs to process each item from EmployeeDetails one by one.
  • After adding the Create item action, it might automatically place it inside an Apply to each loop. If not:
    • Click the three dots (...) on the Create item action > Select Add an action > Search for Apply to each and add it.
    • Move the Create item action inside the Apply to each box by dragging it.
    • In the Select an output from previous steps field of Apply to each, choose value from the Get items action.
 
Step 6: Get data from second list
Now, repeat the process for ContractorDetails.
  1. Add Another Get Items Action:
    • Below the Apply to each section (outside it), click + New step.
    • Search for Get items and select Get items under SharePoint.
    • Configure it:
      • Site Address: Same SharePoint site.
      • List Name: Select ContractorDetails
 
Step 7: Add an Action to Create Items in CombinedList:
  • Click + New step.
  • Search for Create item and select Create item under SharePoint.
  • Configure it:
    • Site Address: Same as above.
    • List Name: Select CombinedList.
    • Employee ID: Select Employee ID from the second Get items action.
    • Name: Select Name from the second Get items action.
    • Department: Select Department from the second Get items action.
Wrap It in Another Apply to Each Loop:
  • Like before, drag the second Create item action into an Apply to each loop.
  • In the Apply to each field, select value from the second Get items action.
 
Step 8: Save and Test the Flow
  1. Save the Flow:
    • Click Save in the top-right corner.
  2. Test the Flow:
    • Click Test in the top-right corner.
    • Choose Manually and click Test.
    • Click Run flow > Done.
    • Wait a moment, then check the flow run status. If it says “Succeeded,” it worked!
 
Step 9: Check CombinedList:
  • Go back to Microsoft Lists and open CombinedList. You should see all items from EmployeeDetails and ContractorDetails copied over.
 
 
After merging the two lists into CombinedList, I have followed the below steps to automatically create an item in CombinedList when we create an item in either list 1 or list 2:
 
  • Create a New Flow:
    • Create a new flow by choosing - Automated cloud flow.
    • Name it - Auto Merge List 1.
    • Search for the trigger When an item is created or modified under SharePoint > Select it > Click Create.
 
  • Set Up the Trigger:
    • Site Address: Your SharePoint site.
    • List Name: Select List 1.

 
  • Add Create Item Action:
    • Add a Create item action for Combined List, using the trigger’s Employee ID, Name, and Department.
 

 
  • Create a new flow for List 2:
    • Create another flow with the same steps mentioned above but set the trigger to the List 2.

 
  • Save and Test:
    • Add a new item to List 1 or List 2 and check if it appears in Combined List. The Combined list should automatically update once you add any entry in list 1 or 2.
      The only part where I'm stuck is when I edit an existing item in either list 1 or 2, it is creating a new item in CombinedList. (creating duplicates) Kindly help out in editing the existing flows or creating a new flow so that it will not create any duplicate values in CombinedList.
       
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,429 Super User 2025 Season 2 on at
     
    So you have 2 things
     
    1. You need a trigger on both of your tables
    2. You need to know if the item exists already in the other side.
     
    Problem:
    You have to have a way to compare the values in the Flow for List 1 versus the Flow from List 2, as you do not know for sure which one created the record. 
     
    The best way to make this happen would be to track the Source List ID in your 3rd list. Now normally if you only had 2 lists, its easy as you only need to add 1 column to store the ID, then in your singular Flow, you would do this
     
    a) check if the incoming is a Created or an Update (which is easy to do)
    b) if its new then just create it in list 2
    c) if its UPdated, update in list 2
     
    But you have 2 lists that you want synced. So my suggestion is this.
     
    Create 2 columns in your 3rd list. 
    Make one an integer and call it List1 (or whatever you want)
    Make another that is an integer and call it List2 (or whatever you want)
     
    Now in your 2 Flows, one for each of your Source Lists, I want you to do this.
     
    Right after the Trigger I want you to add a Condition
    In the Condition. on the left put the Dynamic Created Property then is equal to and then add the Dynamic Modified
     
    Now if these are equal then we know it was just created. SO in the YES side, you will simply do a Create Item on list 3 and if this is Flow for List1 or LIst2, you will populate the List1 or List2 column in the 3rd list, with the Dynamic ID property from the Trigger, depending on if its LIst1 or List2s Flow trigger
     
    In the NO Side you will do an Update Item and this is where have a pre-step.
    You need to first do a Get Items, with a Filter, where List1 or List2 (depending on which Flow trigger for which source list)
    after you do the Get Items
     
    Add an Apply to Each (should only run 1 time)
    Inside the apply to each do an Update Item, copying the data based on whether its List1 or List2 :-)
     
    This will perform quickly and not have you have to loop a lot etc.
     
    If this helps please Mark as the Answer and Click Like.
     
    Feel free to come back after and ask further questions
     
     
  • Michael E. Gernaey Profile Picture
    53,429 Super User 2025 Season 2 on at
     
    Any update to this? Does my response answer you question?
     

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard