Copy a list item with its version history from one SharePoint List to another in a Microsoft Power Automate Cloud Flow
A quick and simple guide by Caspar Rubin that is easy to understand and follow.
1. Initial Situation
We have two Microsoft SharePoint Lists.
List A and List B.
List A has elements with multiple versions and we want to copy those elements with their complete version history to List B.
As you can see below, List A has some sample data and multiple version per row.

List B has no data yet but the same columns as List A.

2. Setup
In your flow, initialize a new variable, give it a name, mine is called ListItemID, and set its type to Integer. Leave the value field empty for now.
We will use this variable at a later point in time.
Variables need to be initialized at the top level of a flow, so that’s why we do it at the start...

3. Get all data
To copy the list items we have to get the items and all their versions from List A first.
We do this by using the “Get items” action to get the newest version and the “Send an HTTP Request to SharePoint” action to get all versions in our Microsoft Power Automate Cloud Flow.

The *Uri in the “Send an HTTP request to SharePoint” action above is the following:
/_api/web/lists/getByTitle('List A')/items(items('Apply_to_each')?['ID'])/Versions?$orderby=VersionLabel asc
Just replace “List A” with the name of your list and “items(‘Apply_to_each’)?[‘ID’]” with the dynamic content ID from the “Get items” action.
4. Copy the Data
We have now retrieved all data from List A, including all versions.
To put that data into List B, we need to iterate / loop through all version and create new items or update existing items, depending on where we are in the loop of our collected data.
To find out if we have to create a new item or update an existing item, we use a Condition action and check the VersionLabel it is is 1.0 or something else.

- We use the following Expression to loop all versions.
body('Send_an_HTTP_request_to_SharePoint_-_Get_all_versions')?['d']?['results']
2. We use the following Expression to check if a version is a new item or if we need to update an existing item.
Important: Make sure you enter “1.0” on the right side of the argument, not just 1.0 because Power Automate will change 1.0 into 1 and the flow won’t work, it needs the ” “.
items('Apply_to_each_-_Versions')?['VersionLabel']
3. We use the following Expressions inside the Create item and Update item actions to fill in the data. Replace Title with the column name. For example, my four columns are:
items('Apply_to_each_-_Versions')?['Title']
items('Apply_to_each_-_Versions')?['Number']
items('Apply_to_each_-_Versions')?['Choice']
items('Apply_to_each_-_Versions')?['Date']
4. Use the “Set variable” action to set the ListItemID variable to the Dynamic content ID of the created item.
outputs('Create_item')?['body/ID']
5. Use the variable “ListItemID as ID in the Update item action
5. Test
When we run the flow, it does exactly what it’s suppose to do. It copies all items and all versions from List A to List B.

Data & Versions in List B:

A quick and simple guide by Caspar Rubin that is easy to understand and follow on how to copy all versions of a SharePoint List Item to another List with a Microsoft Power Automate Cloud Flow in 4 easy steps or how to copy a list item with its version history from one SharePoint List to another in a Microsoft Power Automate Cloud Flow.