Clone SharePoint List Item with Power Automate

Clone a SharePoint List Item with Power Automate

In case you want to update a list in SharePoint Online, in which the item to be inserted only differs, from what is already there, in just one field it would be much more effective if it were possible to copy the existing item and thus create a copy that we can change.

Currently, there is no simple way to duplicate or clone an item in a list using Microsoft SharePoint, so we would have to manually insert all the fields of the item we wanted to change.

In this article we will be able to create a workflow, through Power Automate so that, in just a few steps, it is possible to duplicate items and make the task of updating data and maintaining history, simpler.

  1. Access Power Automate and create an “Instant flow”power automate create instant flow
  2. Define a name for Flow and choose “For a selected item” as “Trigger”
    power automate name your flow
    Name your flow
  3. Select the List name where you want to be able to clone an item
    power automate - select list
    Select list
  4. Click on “New step” and in the menu that appears, search for “Get item” in the Sharepoint connector
  5. Insert the data from the list where we want to get all the information about an item and place triggerBody()?[‘entity’]?[‘ID’] in the Id field.power automate - sharepoint - configure get item
  6. Click on “New step” and search for “Create item” in the Sharepoint connectorpower automate - select action - sharepoint create item
  7. Insert the data from the list where we want to create the item (in this case it is the same). All content to be inserted comes dynamically from the “Get item” connectorpower automate - sharepoint - create item - map fields
  8. Save and testpower automate - save and test

After publishing it you will see the Flow in the list, as shown below.

clone item - power automate - run

 

How to clone the item

To clone an item, simply:

  1. Select the item to copy, click on “Automate”, wait a few seconds, our flow will appear and just click “Clone list item demo”.
    clone item - power automate - run
    Run flow
  2. On the right side, a permission request will appear to connect to Sharepoint and then to execute the flow
    clone item - power automate - run - accept permissions
    Accept permissions
  3. When updating the page we can see the item created from the selected one and now we can change the copy with the most recent data
    cloned item
    cloned item
    cloned item updated
    cloned item updated
  4. For the identification of the versions, an expression was used that verifies the selected version and creates the next version to be changed and thus be able to have a history of changes.
“if(equals(body('Get_item')['Title'],'Original'),'v2',concat('v',string(add(int(split(body('Get_item')['Title'],'v')[1]),1))))”
clone item versioning
clone item versioning

Ready to enhance your SharePoint experience?

Contact us for:

  • Intranet and Portals: Personalized solutions just for you.
  • Application Development: Intuitive, scalable, and secure solutions.
  • Consultancy Services: Expert advisory solutions.
  • Outsourcing: Maximize productivity.
  • Support and Maintenance: Keep your applications running seamlessly.
 

If you are interested in learning more about us and how we can help you, contact us

You can also check out our blog for more articles and insights on  Microsoft 365 technologies.