Introduction
In this article, we will learn to create multiple copies of a SharePoint site page, rename and update its properties using Power Automate.
Use case: I had a requirement to create multiple pages with similar layout, and properties. I have implemented this requirement using Power Automate and an Excel sheet table for list of page title and page name.
In this demo, we will use the table below and the site page highlighted in the screenshot to create copies of the site pages.


Below are the steps to create a PowerAutomate flow for creating multiple copies of a SharePoint site page,
Step 1
Create a new instant cloud flow with the "For a selected file" trigger.

Step 2
Navigate to Site Pages library settings to find the library ID and configure the flow trigger action.

Click on “Enter custom value” and enter library id.

Step 3
Add "Get file properties" action and configure it using ID value from the previous step.

Step 4
Next, add the "List rows present in a table" action to get a list of page titles and names from the PagesTable of the sheet.

Step 5
Add "Apply to each" action to loop through list of table rows using value from the previous step.

Step 6
Add the "Copy file" action and configure as per below screenshot to create copy of the selected site page. You need to use Identifier property of the source page.

Step 7
Add the "Get file properties" action to get newly created site page in last step.

Step 8
Add the "Send an HTTP request to SharePoint" action to update page title and page name for current table row. Provide request body properties to update, we have used "FileLeafRef" property to rename SharePoint site page.

Step 9
Select a page and run the flow to create copies of the selected SharePoint page.

Output
Flow created 5 copies of the selected page(DemoPage) and renamed and updated the title in accordance with the Excel sheet table.

Conclusion
In this article, we learned to create multiple copies of a SharePoint page and rename it using SharePoint API request in Power Automate. You must use SharePoint API call to rename SharePoint page with 'FileLeafRef' property.
Thank you for reading.

Virginia ValentiPosted Jul 21, 2023, 11:18 AM
Hi Santosh, thanks for this guide! I have a quick question -- I cannot find the "FileLeafRef" property, and when I try to update it using HTTP request, it doesn't work. Flow runs but the file name does not update. Do you have a solution for this? I've tried "FileName" as well but same result
J StrasarovPosted Apr 28, 2023, 6:06 PM
I have created a flow to copy a template page on a SharePoint site and I need to also rename it. My trigger is Sharepoint >> When an item is created. I am using Copy File to create a copy of the template page. One of the copy file req is to specify if there is another file already there if I want to replace, copy with new name or fail this action. There is an option to Enter a custom value but I have no idea what to put there to have it save as something else. This would likely be the easiste route if I knew what to put to have it save as a new name which would actually be exact text from a field in the item that is being created to start the flow. Currently in my flow I have successfully copied the template as template1 using the copy as new name. How can I add steps to the flow to rename the page using dynamic field from SP list item?
Suyog PatilPosted Dec 5, 2022, 7:57 AM
Great... Probably different use case, but It would be more powerful if site details and library details would be present in source configuration (excel sheet).