In this Microsoft Power Automate Tutorial, we will see what is a Power Automate Copy folder action, and what its used in Microsoft flow.
Also, we will discuss what is the copy folder structure, How to copy the SharePoint folder, How to copy a folder with a new name in Microsoft flow, and so on.
Also, by taking some different scenarios, we will cover these below topics:
- Power Automate copy folder contents from OneDrive to another
- Power Automate copy folder and files
- Power Automate copy folder and subfolders
- Power Automate copy SharePoint folder to another on a recurring basis
- Power Automate copy SharePoint folder to onedrive
- Power Automate copy email attachments to SharePoint folder
- Power Automate for SharePoint folder permissions
Power Automate copy folder
In Power Automate, there is an action under the SharePoint connector named ‘Copy folder‘ that is used to copy a folder. It works in a similar way to the “Copy to” command in SharePoint libraries.
This action returns information about the new folder after copy. It needs some parameters to activate the action such as:
- Current Site Address– Specify the current SharePoint site adress.
- Folder to Copy– Select the folder using the folder path that you want to copy.
- Destination Site Address– Specify the destination SharePoint site address.
- Destination Folder– Select the destination folder path where you want to store the copied folder.
- If another folder is already there– Select a action if another folder is alredy exist with same name.
- Copy with a new name- It will copy the folder with a new name if the folder is already there.
- Fail this action- It will fail the action if the folder is laredy exist.
- Replace– It will replace the older folder with the new folder.

This is how the copy folder works on Power Automate.
Also read: Power Automate Copy Files + 21 Examples
Power Automate copy folder structure
In Power Automate, the copy folder structure means copying only the folders and the documents in the root folder.
For example, we have some files in a subfolder in a SharePoint Document Library.

Let’s check this folder structure by clicking on Show picker in the Copy folder action.

Here the ‘/Shared Documents’ is the root folder and ‘/Shared Documents/Files/Image‘ is deep in the folder structure. This is how to show the folder structure in the copy folder using Power Automate.
Read: Power Automate Create PDF + 11 Examples
Power Automate copy sharePoint folder
Now, we will see how to copy the SharePoint folder from one library to another library within SharePoint. Before creating a flow make sure to log in the Power Automate with the Microsoft tenant address.
For example, we have an image folder having some images in one of the SharePoint document libraries and we want to copy this folder to another document library.

Let’s create an instant cloud flow to copy folders from one document library to another. Click on + create > Instant cloud flow. Select the trigger to start the button flow ‘Manually trigger a flow.

Under the trigger, we will add a new action that will get all the information about the folder using a file identifier. Click on +New step > Select the action ‘Get folder metadata‘.

Here we will set the Site address and in the file identifier, select the folder that we want to copy i.e. Image.

Next, we will add an action that will copy the folder from the source library to the destination library. Click on + New step > Search the action ‘Copy folder‘.

Then it will ask to set the below parameters to activate the action:
- Current Site Address– Set the Current SharePoint site address
- Folder to Copy– Select ID from the dynamic content of the Get folder metadata
- Destination Site Address– Set the destination SharePoint address
- Destination Folder– Choose a folder path or document library where you want to store the copied file.
- If another folder is already there– Select Copy with a new name.

Let’s save the flow and test it manually. We can see the flow ran successfully with a green tick. Also, we can see the Image folder has been copied to the destination folder with items.

This is how to copy the SharePoint folder using Microsoft flow.
Also, read this tutorial: Power Automate dynamic content [Complete tutorial]
Power Automate copy folder with a new name
Here we will see how to copy a folder with a new name using Power Automate. For example, we have a folder named ‘Files‘ in the source library.

Let’s create an instant flow that will copy the folder from one SharePoint library to another and store it in a new name.
On Power Automate, go to +Create > Instant cloud flow > Trigger the flow manually. Then click on the +New step to add the logical action.

Search for Copy folder action. Select the action under the Sharepoint connector. Provide the Current Site Address, Folder to Copy, Destination Site Address, Destination Folder, and in the ‘If another folder is already there‘ set as Copy with a new name.

Then Save the flow. Test it manually. We can see the folder will copy from the destination folder to the source folder.

As the folder is copied, If we rerun the flow it will copy the folder with a new name:

This is how to copy a folder with a rename in Power Automate.
Read: Start and wait for an approval Power Automate [Complete tutorial]
Power Automate copy folder and subfolders
Similarly, here we will see how to copy folders and subfolders from one SharePoint document library to another. For example, we have a folder named ‘Files‘ having 2 subfolders with some random documents inside them i.e. Image, SubFiles.

Now we will create a button flow, that will copy all these subfolders and folders from the source library to the destination library location on the same site (or you can set the different SharePoint site addresses).
On Power Automate, Click on My flows > +New flow > Instant cloud flow.

Then select the trigger to start the flow manually i.e. Trigger the flow manually.

Next, click on the +New step to add the logical action in the flow. Select the Copy folder action.

Let’s Save the flow and test it manually. We can see the folder and subfolders have been copied to the destination library.

This is how to copy the Sharepoint folder including the subfolders using Power Automate.
Check out this tutorial: Power Automate flow with Microsoft teams
Power Automate copy folder and files
Here we will see how to copy folders including files from one document library to another document library using different SharePoint site addresses.
For example, we have some random files and folders in one document library i.e. the Source document library.

Let’s create an instant flow that will copy all these folders including files from this source library to the destination library using different Sharepoint site addresses.
On Power Automate, go to + Create > Instant cloud flow > Select the trigger ‘Manually trigger a flow‘.
Then (under the trigger) click on + New step > Get folder metadata action. This action will get the information about the folder by using a file identifier to pick the folder. Here we will set the below parameters such as:
- Site Address– Set the source site address
- File Identifier– Set the folder path from where you will get the folder metadata.

Next, we will add an action that will copy the folder from the source site address to another. Click on + New step > Copy folder. Then set the below properties such as
- Current Site Address– Set the source SharePoint site address
- Folder to Copy– Select ID from dynamic contnet of the Get folder metadata.
- Destination Site Address– Set the destination site address
- Destination Folder– Set the destination document library where want to store the copied files and folders
- If another folder is already there– Set as copy with a new name

Let’s save the flow and test it manually. Then click on run the flow.

We can see the folders and the files move from the source library to the destination library.

This is how to copy folders and files using Microsoft flow.
Also, you can read: Power Automate or Microsoft Flow delete all files in a folder
Power Automate copy SharePoint folder to onedrive
Here we will see how to copy folders from the Sharepoint library to OneDrive. In SharePoint, there is an option ‘Copy to‘ that will copy folders, subfolders, and files from Sharepoint to OneDrive without using any flow.
For example, we have some random folders in the Sharepoint Document library. Let’s select those folders that you want to copy.

Then click on Copy to, it will show the destination location where we will store the copied folder inside the OneDrive.

Select ‘Your OneDrive‘ to choose a folder or you can create a new folder to store the copied folders. For example, we will create a new folder named ‘Copied Folder from SharePoint‘. Then click on ‘copy here‘.

Then again select the folder and click on ‘Copy here‘.

Now we can see the foders are copied to the OneDrive location.

This is how to copy SharePoint folders to OneDrive.
Read: Power Automate add days to date
Power Automate copy SharePoint folder to another on a recurring basis
Now we will see how to copy the SharePoint folder from One SharePoint site to another on a recurring basis i.e. we can copy the folders on a particular time basis.
For example, we have some files and folders in a SharePoint document library and we want to copy these folders from one site to another on the basis of recurrence.

Let’s create a scheduled cloud flow that will copy folders from one SharePoint site to another.
On Power Automate, click on + Create > scheduled cloud flow.

Here we will give a flow name and set the time, day. For example, we want to repeat this flow repeats every 1 day. Then click on create.

It will trigger the flow once a day according to date and time. Now, we will add the logical action in the flow. For this, click on the +New step (under the recurrence trigger).

Then search the action ‘Copy folder‘ under the SharePoint connector and select the action to add it to the flow.

Next, we provide the Current Site Address, Folder to Copy, Destination Site Address, Destination Folder, If another folder is already there.

Then Save the flow and test it manually. We can see the file has been copied to the destination library i.e Copied documents of the SharePoint Guides.

This is how to copy the SharePoint folder to another on a recurring basis using Power Automate.
Check out this tutorial: Power Automate Increment Variable + 11 Examples
Power Automate copy folder contents from OneDrive to another
Here we will see how to copy folder contents with subfolder from the OneDrive to another using Power Automate flow.
For example, we have a folder with some subfolders and documents in the OneDrive root folder.

This Image folder has a subfolder and that subfolder has some random files.
Let’s create an instant cloud flow that will copy all the folders and the subfolders with the folder content into a new folder.
On Power Automate, click on +Create > Instant cloud flow > Select ‘Trigger the flow manually‘.
Under the trigger, click on +New step > Select the action ‘List files in folder‘ under the OneDrive connector. Here we will provide the folder path that you want to copy.

Next, we will add an action that will copy all the folder content including the subfolders to the destination folder in OneDrive. Click on +New step > Copy file. Then set the below properties to activate the action:
- File– Select id from the dynamic content.
- Destination File Path– Give a destination folder path or you can create a new folder using ‘/‘ and select display name from the dynamic content(ex- /new folder name/Display name).
- Overwrite– Yes

Let’s save the flow and test it manually. In OneDrive, we can see it will create a new folder named ‘Copy contents‘ with copied subfolders.

This is how to copy folder contents into a new folder using Power Automate.
Read: Power Automate SharePoint Get items filter query contains is not valid
Power Automate copy email attachment to folder
Here we will see how to copy the email attachment(s) to the SharePoint folder using Power Automate.
Let’s create an automated flow that will copy all the attachments to a SharePoint folder.
On Power Automate, go to +Create > Automated cloud flow > Select a trigger ‘When a new email arrives (V3)‘. Select the folder to where the email will arrive i.e. Inbox.

Then we will add an action that will copy the email attachments to the SharePoint folder.
Click on +New step > Create file(under the SharePoint). Set the properties like below:
- Site Address– Set the SharePoint site address.
- Folder Path– Select the folder path where you want to store the email attchment.
- File Name– Choose Attachments name from the dynamic content.
- File Content– Choose Attachements Content from the dynamic content.

Let’s save the flow and test it manually. For testing purposes, we will send an email with attachments to ourselves.

We can see all the attachments will save automatically in the SharePoint folder.

This is how to copy email attachments to a folder.
To find more details about it, refer to this link: Power Automate save email attachment to SharePoint
Power Automate copy folder source or destination likely invalid
- In Power Automate, while copying a folder from the source folder to another SharePoint folder, sometimes we may get errors like Source or Destination likely invalid. Check if the item or destination has been deleted. (Status Code: 400, Bad Request).
- You can view the error in the below image. To overcome this type of error, you can try this Power Automate forum post link: Copy folder source or destination likely invalid in Microsoft flow.

Read Power Automate OData filter query with examples
Power Automate copy folder permissions
Using Power Automate, we can set permission on documents or folders in the SharePoint document library using Grant Permissions action.
We can find this action, by following these steps:
On document library, go to Settings > Document library settings > Permission for this document library(Permission and Management) > Click on Stop inheriting permissions. So that we can create unique permissions for this document library.

For this, we will create an automated flow that will set unique permission to the document library with Power Automate.
Let’s create a flow that will trigger when a folder is created. On Power Automate, click on +Create > Automated cloud flow > trigger the flow ‘When a file is created (properties only)‘.

Then we will configure the trigger with the Site address and the library name.

Next, we will add an action that will grant access to an item or a folder in SharePoint to specific people.
Click on +New step > Select the action Grant access to an item or a folder. Set the properties like below:
- Site Address– Specify the Site address
- List or Library Name-set the document library name
- Id– Select Id from the dynamic content
- Recipients– Set the recipients who will receive the sharing invitation
- Roles-Specify the role such as can edit, can view that is to be granted to the recipients.
- Notify Recipients– Specify whether recipients should recieve an email notification message.

Let’s save the flow and test it manually. Then we will create a new folder in the document library.

Also, we can see it will send a notification to user4 via Outlook.

We can check that, User4 does not have any permission or option to edit the folder as we set it can only view it.

This is how to set unique permission on the SharePoint folder using Power Automate.
Also, you may like the below Power Automate tutorials:
- Power Automate Do until
- Power Automate create a task in Microsoft Planner
- Power Automate copy list item to another list with attachments
- Power Automate get items examples
- Power Automate vs UiPath
- Power Automate conversion of string
- Power Automate Number Format
- Power Automate convert time zone
- Power Automate Concatenate String
- How to convert decimal to whole number in Power Automate + convert decimal to percentage
Conclusion
From this Power Automate Tutorial, we learned all about copy folder action. Also, we discussed the below topics as:
- How to use Power Automate copy folder?
- What is copy folder structure in Power Automate?
- How to copy sharePoint folder using Power Automate?
- How to copy folder with a new name using Power Automate?
- How to copy SharePoint folder and subfolders using Power Automate?
- What is copy folder including files using Power Automate?
- How to copy SharePoint folder to onedrive
- Work with copy SharePoint folder to another on a recurring basis using flow?
- How to copy folder contents from OneDrive to another using Microsoft flow?
- Copy email attachment to a SharePoint folder using Power Automate?
- How to set an unique permission on the SharePoint folder using Power Automate?
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com
Thank you Bijay, very useful! I work with libraries that often may have more than 50,000 files, in folder structures. Files may have been tagged with retention labels. Are there any showstoppers you may warn about when dealing with large libraries and the workflows you presented?
Cheers!