Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Replicate SharePoint Library to List

Dear all,


Here is the story!  After I showed the power of Flow and PowerApps to my friend who is also using the O365 for his own business. He really wanted to move his data into PowerApps.  So I was happy to help him.  Later I found that he used quite a lot of libraries instead of lists which makes the migration work not straight forward.  And then I found that he used a lot of Lookup fields which PowerApps and Flow absolutely don't like.  I decided to help him replicate his library to a list.


This is what I successfully did:-

1) I built a flow to replicate the columns (except lookup) of the library and the file to a new list

2) I export the library data to Excel so that I have a copy of the data with the Lookup column data, and then import back to SharePoint (the new list uses only text and number columns)


Now I want to fill in the missing piece of the Lookup Column data based on the Excel Import List.  When I exported the Library data out, I purposedly exported the record ID for matching purposes.  However, I am having trouble in getting the previous Library record ID when I was creating the new List record during the replication process.  I always got the Create Item ID instead of the previous record ID.


The syntax I used is:-  




to fill in the oldIDno and oldIDtext field coz I don't know what form will  the ID be returned. Below is a screen dump of the flow.




In the beginning, I thought it must be straight forward to replicate a SharePoint list or library since the Flow has been upgraded so much.  I didn't expect that this Lookup field would make things so difficult.  This is a good lesson learned.  I welcome any advice or any better way to replicate a library or a list.  Many thanks!




Super User
Super User

While I am not totally clear on what your trying to accomplish with a two step process, I would like to make the following suggestions:

1) You may want to start over.  There is no reason why you can't use the Lookup ID (it is available via Dynamic properties) of the library as the value of the lookup for the list assuming that you are using the same lookup list.  The reason things got complicated is that you are doing this in two steps.


2) While you can use Flow, I will suggest that you can get the job done much more easily and quickly using MS Access.  You can connect to both the old library and new list.  Then, use an insert query to create the list items.  If need be, you can use Flow after the fact to attach documents to the list items as attachments, etc.



If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,312)