In this Microsoft Flow Tutorial, We will discuss how to copy items from one SharePoint Online List to another SharePoint Online List using Microsoft Flow or Power Automate.
By using this below example, I will show you how we can copy items from one list to another list from one SharePoint site to another SharePoint Site using the Microsoft flow template.
Here I have two SharePoint Online List as “SharePoint Book Order Details” which is present in the Source Site. And another SharePoint Online List as “SharePoint Book Order” which is present in the Destination Site.
Both SharePoint lists are having same data types of Columns with the same Column name. You can see one of the below SharePoint Online List which is present in the Source Site.
Both of the SharePoint Source List and Destination List is having below different data types of columns as:
- Title (By default) (Single line of text)
- Book Name (Single line of text)
- Book Price (Currency)
- Quantity (Number)
This below screenshot represents the other list (SharePoint Book Orders) which is present in the Destination Site.
Microsoft flow copy list items to another list
Here, I will show you how we can copy all the items from one SharePoint List (Source Site) to other SharePoint List (Destination Site) using Microsoft Flow.
You can view the below screenshot which represents the whole structure of Microsoft Flow. Follow the below descriptions about all templates which I have used in this Microsoft Flow.
When an item is created or modified:
- Site Address: Provide the SharePoint Site address URL of Source Site.
- List Name: Specify the name of the SharePoint List of the source site. As in this example, I have taken my Source site SharePoint List as “SharePoint Book Order Details“.
Get items:
- Site Address: Provide the SharePoint Site address URL of Destination Site.
- List Name: Specify the name of the SharePoint List of the destination site. As in this example, I have taken my Destination site SharePoint List as “SharePoint Book Orders“.
- Filter Query: This field helps you to match the Titles of the rows of the Source. For matching the Titles, you can write as Title eq ‘(select Title from Dynamic content)‘.
NOTE:
1. It is not necessary to take the Title column always. You can take any column which you want to map between source list and destination list, But the column name should be same in the both of the lists.
2. For example, if you have columns for the First Name and Last Name in the source list, and a column for Full name in the destination list, you could type: FullName eq ‘[First name] [Last name]’.
3. You need to sure that the Dynamic content Title value should be present within the single quote, Otherwise, you may face the flow issue.
Condition to check if the Item exists:
Now you have to take a condition action where it will check either the item is present inside the Destination List or not. Then put the condition as like below:
equals(length(body(‘Get_items’)?[‘value’]), 0) is equal to true
You can follow the below screenshot of Condition action. This condition will be display as shown in below.
If Condition Exists:
If the above condition is satisfied, then add a “Create item” action in the “yes” branch which is having below fields:
- Site Address: Provide the Site address URL of Destination Site where the item will create.
- List Name: Specify the name of the destination list where the item will create.
- Title: Take the title field column value from the Dynamic content of source list as “when an item is created or modified“.
In the same way of Title field, take rest all the field column value from the
Dynamic content of source list as “when an item is created or modified“.
If Condition doesnot Exists:
If the above condition is not satisfied, then add an “Update item” action in the “no” branch which is having below fields:
- Site Address: Provide the Site address URL of Destination Site where the item will update.
- List Name: Specify the name of the destination list where the item will update.
- Id: Make sure that you need to take the Id field column value from the Dynamic content of “Get items“. While you add the Id from Get items, then an “Apply to each” action will be added automatically on the top of the action.
- Title: Take the title field column value from the Dynamic content of source list as “when an item is created or modified“.
In the same way of Title field, take rest all the field column value from the
Dynamic content of source list as “when an item is created or modified“.
Once the flow will complete, just “Save” and “Test” it.
To test the flow, you need to create or modify the SharePoint list item, then only the flow will trigger. To test my flow, I have created a new item in the source list (SharePoint Book Order Details) which you can see in the below screenshot.
After a while, when you will visit the Microsoft flow again, then you can get a successful status message as “Your flow ran successfully“.
Now go to the Destination Site (SharePoint Book Orders) List, You can see that your item will be copied from the Source List (SharePoint Book Order Details). You can see that in this below screenshot.
You may like following Microsoft flow tutorials:
- Microsoft Flow Example: Send a customized email when a new SharePoint list item is added
- PowerApps upload file to SharePoint Online document library using Microsoft Flow
- Microsoft Flow Example: Email notification after approval from a SharePoint list
- Microsoft Flow Example: Copy Files from SharePoint to PC
- Microsoft Flow Example: Copy new files from your PC to SharePoint Online Document Library
- Microsoft Flow Example: Automatically create a profile for a new candidate
- Microsoft Flow Example: When a message is posted on a group, create a SharePoint list item
- Microsoft Flow Example: When an item is created in SharePoint List, send approval and create an item
- How to run Microsoft Flow on Schedule
- An entry without a type name was found, but no expected type was specified error in Microsoft Flow
- How to get manager email or name in Microsoft Flow (Power Automate)
- Save my email attachments to a SharePoint document library Power Automate or Flow
In this Microsoft Flow Tutorial, We discussed how to copy items from one SharePoint Online List to another SharePoint Online List using Microsoft Flow or Power Automate.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com
I am having issues as my column is called Region Name with a space between. The flow keeps failing on this as it may be considering this to be two different columns. I noticed that you stated above “2. For example, if you have columns for the First Name and Last Name in the source list, and a column for Full name in the destination list, you could type: FullName eq ‘[First name] [Last name]’.”
You have a column for Full name but in the statement you put FullName with no space. I tried this and it also failed. If there is a space in the column name, how do I specify this? The space is in both the source and destination and I’m not sure if the first part of the statement is referring to the source which I cannot change.