Copy a SharePoint file to another site with Power Automate
Short answer: use the SharePoint action "Copy file". Point it at the file with the "File to Copy" field, type the address of the other site in "Destination Site Address", pick the folder in "Destination Folder", and choose what to do in "If another file is already there". Start the flow with a file trigger so every new file is copied by itself. Do not skip the last field. It decides what happens when the name is taken.
What the action does
The connector page describes it this way: "Copies a file. Works in a similar way to the "Copy to" command in SharePoint libraries. Returns information about the new file after copy."
So the flow does what a person does when they pick a file in a library and choose Copy to. The difference is that the flow does it for you, every time, with no clicking.
The action lists these fields. All five are marked required on the connector page:
- Current Site Address: the site where the file is now.
- File to Copy: the file, picked by its identifier.
- Destination Site Address: the site that gets the copy.
- Destination Folder: the folder on that site.
- If another file is already there: what to do when the name is taken.
What you need first
- Two SharePoint sites, or one site and one library you want to copy into. You need access to both.
- The full address of each site. It looks like https://contoso.sharepoint.com/sites/sitename. That is the example the connector page gives. Replace the sample with your own address.
- A Power Automate license that allows the SharePoint connector. Check with your admin.
- Permission to add files in the destination folder. If your own account cannot add a file there, the flow, which runs with a connection you set, may not be able to either. Our advice, not a Microsoft rule: test the folder by hand first.
- One test file you do not mind copying.
Open https://make.powerautomate.com to start. Menu and action names change over time, so exact names may differ on your screen.
Step 1. Pick a trigger
Decide what starts the copy. Three choices:
- A new file lands in a library. Use "When a file is created (properties only)".
- A new file lands or an old file changes. Use "When a file is created or modified (properties only)".
- A person starts it. Use a manual trigger and pick the file.
The first two triggers ask for Site Address and Library Name. The connector page marks both as required. They also have an optional Folder field: "Select a folder, or leave blank for the whole library".
Microsoft's description of both triggers says: "You can add a "Get file content" step and use the "File identifier" property returned by this action to get to the contents of the file." The same File identifier is what the Copy file action needs in its "File to Copy" field.
One way to start: use the created trigger. A file that is only edited later is not copied again. If you need edits copied too, read the loop section below first.
Step 2. Add the Copy file action
- Choose to add an action and search for "Copy file".
- Pick the one named "Copy file". Do not pick "Copy file (deprecated)". Microsoft says: ""Deprecated" triggers and actions are no longer actively maintained. While these operations still exist in this connector, you're strongly advised to not use them in any new solutions or apps."
- Set Current Site Address to the site of the source library.
- Set File to Copy to the File identifier from the trigger. Pick it from the dynamic content list.
- Set Destination Site Address to the address of the other site.
- Set Destination Folder to the folder that should get the copy.
- Set "If another file is already there". See the next section.
Decide what happens when the name is taken
This is the field that causes surprises. If a file with the same name is already in the destination folder, the action needs to know what to do. The connector page lists the field and says only: "Pick one of the options available". Open the list on your screen and read each option before you choose.
One way to start: if the list has an option that stops without replacing the file already there, pick it, then test it. Our advice, not a Microsoft rule: when you are not sure, a copy that fails with a clear error is easier to fix than a file that was replaced without anyone noticing.
Think about these cases before you choose:
- Same file sent twice by the flow. You do not want two copies, or a replaced copy.
- Two different files with the same name from different people. You do not want one to hide the other.
- A file that was edited. Do you want the new version to replace the old copy, or sit beside it?
The deprecated version of the action had a yes or no field named "Overwrite Flag". The current action replaces that with the "If another file is already there" list.
What gets copied and what does not
Microsoft's support page on copying files says three things that matter here:
- "When you use Copy to with documents that have version history, only the latest version is copied."
- "Metadata for the file being copied or moved will be preserved as long as the same term store is used..." in both locations.
- "When you move or copy a file to a location with different properties, only supported properties..." at the new location are maintained. The page gives this example: if the source library has a Priority column and the destination does not, "the information in the Priority column will be lost."
That page describes the Copy to command in the library. The connector page says the Copy file action "works in a similar way" to that command. Our advice, not a Microsoft rule: add the same columns to the destination library before you turn the flow on, then copy one file and compare the columns.
The same support page says, "You can copy up to 500 MB of files and folders at one time." That line is about the Copy to command. Test your biggest file in the flow before you rely on it.
Step 3. Test with one file
- Save the flow.
- Add your test file to the source library.
- Open the flow and look at the run history. Each action shows a check mark or an error.
- Open the destination folder on the other site. The copy should be there.
- Open the file. Check its columns and its name.
- Add the same file name a second time. Check that the option you picked did what you wanted.
If you want edits copied too
If you use "When a file is created or modified (properties only)", the trigger fires on every edit. That has two risks.
- A flow that changes files in its own source library can start itself again. See "Power Automate flow keeps running itself over and over".
- If you also build a second flow that copies back from the destination to the source, the two flows can feed each other. Our advice, not a Microsoft rule: copy in one direction only.
Add a Condition at the start of the flow. Use it to stop the run when the file is not one you want to copy, for example when a Status column is not set to "2 Approved". If you keep a Status choice column, number the choices (1 Draft, 2 Approved) so they sort in your order, and match the text with the number prefix in the Condition.
Copy, or move?
Power Automate also has "Move file". It has the same fields as Copy file. The connector page describes it as working "in a similar way to the "Move to" command in SharePoint libraries".
The support page says, "When you use Move to, the history of the document is copied to the new destination." It also says a moved file "continues to appear in the source directory until it's fully moved to the destination" and then is deleted. Use Copy file when the source must stay. Use Move file when the file should leave the old place. Our advice, not a Microsoft rule: use Copy first, check the result, and change to Move only when you are sure.
What to avoid
- Do not use the deprecated Copy file action in a new flow.
- Do not leave "If another file is already there" at a guess. Read the options.
- Do not point the destination at a folder your team cannot open. A copy no one can find is not a copy.
- Do not copy in both directions.
- Do not trust one test. Run a file with a space or a long name, a file with a different type, and a large file.
- Do not assume your organization allows copying across sites. The support page notes that if no other sites appear when a person tries Copy to, "your organization doesn't allow moving or copying across sites." Ask your admin if the flow fails with a permission error.
If the flow fails
- Open the run history and click the failed action. Read the error text first.
- A connection that has expired will fail every action. See "Flow fails because the connection expired: how to fix it".
- A file that someone has open can block the copy. See "Fix "file is locked for shared use" in Power Automate".
- If you need a folder made on the destination first, see "Create a document folder automatically for each new list item".
Honest limits
A copy is a second file. Edits to one do not flow into the other, unless you build another flow for that. Two copies can drift apart, and people will not know which is right. If the goal is that everyone sees the same file, a link to the one file can be a better answer than a copy. If the goal is a record that does not change, such as an approved contract saved to an archive site, a copy is the right tool. Copying a whole list is a different job. For that, see "Copy a SharePoint list to another site with its data".
When to get help
You can build all of this yourself in Microsoft 365. If you would rather have it built and tested for your team, I do that. A tracker like this is a fixed price: $5,000 for one, built in 2 weeks. See "What a SharePoint tracker costs to build". Bring one example of the problem to a free call.
I am Al Davies. I run 250 High Street LLC and build SharePoint trackers and Power Automate flows for operations teams. I work remotely. The first call is free, and I will not try to sell you anything.
See trackers I built: Tools I built
FAQ
Which action copies a file to another SharePoint site?
"Copy file" in the SharePoint connector. It has fields for the current site, the file, the destination site, the destination folder and what to do if the name is taken. Do not use "Copy file (deprecated)" in a new flow.
Does the copy keep the old versions of the file?
Microsoft's support page says that with Copy to, "only the latest version is copied." The connector page says the Copy file action works in a similar way to that command. Copy one file with several versions and look at the history of the copy.
Will the columns come across to the other site?
Only columns that exist at the destination. Microsoft's support page gives an example where a Priority column is lost because the destination library does not have one. Add the same columns first.
What if a file with the same name is already there?
The action has a required field, "If another file is already there". Microsoft's connector page says to "Pick one of the options available". Read each option on your screen and test it with a duplicate name.
Can I copy a whole folder?
There is a separate action named "Copy folder". The connector page says it "Copies a folder" and works like the Copy to command. It has its own field, "If another folder is already there".