SharePoint site owners often need to copy files between document libraries. Doing this manually for many files takes time and causes errors. Power Automate can copy files automatically between libraries in the same site or across different sites. This article explains a practical checklist for setting up a Power Automate flow to copy files reliably. You will learn the correct triggers, actions, and settings to avoid broken copies and missing metadata.
Key Takeaways: Power Automate File Copy Flow Checklist
- Trigger selection: Use “When a file is created or modified (properties only)” to start the flow without waiting for all file properties.
- Copy file action: Use the “Copy file” action from the SharePoint connector, not the “Create file” action, to preserve metadata.
- Error handling: Add a “Configure run after” setting to the copy action to handle cases where the source file is locked or already exists.
Why a Checklist Is Needed for Copying Files
Power Automate offers several ways to copy files between libraries. The default flow template “Copy a file” works for simple cases but fails when files have custom metadata or when the destination library uses different columns. The root cause of most failures is that the flow copies only the file binary data and not the column values. Another common issue is the trigger selection. The “When a file is created or modified” trigger runs before the file is fully saved, causing the copy to grab an incomplete version. To avoid these problems, you need a structured checklist that covers trigger setup, metadata mapping, error handling, and testing.
Prerequisites Before Building the Flow
Before you create the flow, confirm the following items are ready:
- You have a Power Automate license (included with Microsoft 365 plans that have SharePoint Online).
- You own the source and destination SharePoint sites, or have at least Contribute permissions on both libraries.
- The destination library already exists. Power Automate cannot create a new library.
- Both libraries are in the same tenant. Cross-tenant file copy is not supported with standard connectors.
- You have identified which metadata columns must be copied. Power Automate copies only columns that exist in both libraries with the same internal name.
Checklist Steps to Copy Files Between Libraries
Follow these seven steps in order. Each step includes the exact menu name, action name, or setting you need to configure.
- Create an automated cloud flow
Sign in to Power Automate (flow.microsoft.com). Select Create and then Automated cloud flow. Give the flow a name such as “Copy new files to destination library.” Choose the trigger When a file is created or modified (properties only) from the SharePoint connector. Do not use the trigger without “properties only” because that trigger waits for all file properties to be written, which delays the flow. - Configure the trigger with source library details
In the trigger card, set Site Address to the source site URL. Set Library Name to the source library name. Leave Folder blank if you want to monitor the entire library, or enter a specific folder path. Set Limit by Folder to No unless you need to restrict the trigger to one subfolder. - Add a Get file metadata action
Add a new step. Search for Get file metadata from the SharePoint connector. Set Site Address to the source site. Set File Identifier to the Identifier dynamic content from the trigger. This action retrieves all metadata columns of the source file. - Add a Copy file action
Add another step. Search for Copy file from the SharePoint connector. Set Source Site Address to the source site. Set Source File to the File Identifier dynamic content from the trigger. Set Destination Site Address to the destination site URL. Set Destination Folder to the destination library path, for example/sites/TeamSite/Shared Documents/TargetFolder. Set Overwrite to No to prevent accidental replacement of existing files with the same name. - Map metadata columns manually
The Copy file action does not copy custom metadata columns automatically. To preserve metadata, add a Update file properties action after the Copy file action. Set Site Address to the destination site. Set File Identifier to the ID dynamic content from the Copy file action. Add each column you need to copy. For example, if the source library has a column named “Department,” set Department to the Department dynamic content from the Get file metadata action. Repeat for every column that must be preserved. - Add error handling for file conflicts
Open the Copy file action settings (click the three dots and select Configure run after). Check the boxes for is successful, has timed out, is skipped, and has failed. Then add a parallel branch condition. Use the Status code output from the Copy file action. If the status code is 409 (conflict), the flow can rename the file using a Create file action with a timestamp appended to the filename. This prevents the flow from stopping on duplicate names. - Save, test, and monitor
Save the flow. Upload a test file to the source library with at least one custom metadata value. Check the destination library for the copied file and verify the metadata. Open the flow run history in Power Automate to review each step’s inputs and outputs. If any step fails, the error message shows the exact cause.
Common Mistakes and How to Avoid Them
The flow copies only the file name and not the content
This happens when you use the Create file action instead of the Copy file action. The Create file action requires you to provide the file content as a binary input. If you pass the wrong dynamic content, the destination file will be empty or contain only metadata. Always use the Copy file action for full file content transfer.
Metadata values are missing in the destination library
The Copy file action copies only the file binary and the standard columns (Name, Title, Created, Modified). Custom columns such as Choice, Person, or Lookup columns are not transferred. You must add the Update file properties action after the copy to write those values. Also verify that the destination library has columns with the same internal name. If the internal name differs, the Update file properties action will fail.
The flow runs multiple times for the same file
The trigger “When a file is created or modified (properties only)” fires when any property change is saved, including metadata updates. If your flow updates the file properties in the destination, and the trigger monitors the destination, it creates a loop. To avoid this, either set the trigger to monitor only the source library, or add a condition that checks if the file was already copied. One way is to add a Yes/No column named “Copied” in the source library and set it to Yes after the copy. Then the trigger can filter for files where Copied equals No.
Copy File Action vs Create File Action: Key Differences
| Item | Copy File Action | Create File Action |
|---|---|---|
| File content handling | Copies binary content automatically | Requires binary input from a previous step |
| Metadata preservation | Copies only standard columns (Name, Title) | No metadata transfer; you must set all columns manually |
| Error on duplicate file name | Returns status code 409 (conflict) | Fails with error unless you set Overwrite to Yes |
| Performance | Faster for large files because content is streamed | Slower because content is read and written in chunks |
| Best use case | Copying files between libraries in the same tenant | Creating a new file from a template or external source |
Now you can set up a Power Automate flow that copies files between libraries with full metadata and error handling. Start with the checklist above and test with a small set of files before enabling the flow for all users. For advanced scenarios, consider using the Send an HTTP request to SharePoint action to copy files with version history intact, which the standard Copy file action does not support.