How to Fix Power Automate SharePoint Copy File 400 Error
Question details
The user is encountering a 400 error in a Power Automate flow when trying to copy an Excel file into the SharePoint Documents folder of a newly created Microsoft Team.

- Product
- Power Automate, SharePoint
- Device & OS
- not provided
- Scenario
- Creating a Microsoft Team using a Power Automate flow and subsequently attempting to copy an Excel spreadsheet into the new team's General folder.
- Observed behavior
- The flow successfully creates the Microsoft Team, but the 'Copy file' action fails with a 400 error because the destination folder has not fully provisioned yet.
Verify that your Power Automate connection has the correct permissions to access the target SharePoint site and ensure the file path being referenced is accurate.
Use the SharePoint Create File Action Instead of Copy File
Bypass the folder provisioning delay by utilizing the 'Create file' action, which handles new site structures more reliably than the 'Copy file' action in automated flows.
When a new Microsoft Team is created, its connected SharePoint site and default Documents/General libraries take a few moments to provision fully. Executing a 'Copy file' action immediately often triggers a 400 Bad Request error because the destination path does not technically exist at that exact millisecond.
Open your Microsoft Power Automate dashboard, locate the failing flow, and click 'Edit' to open the workflow canvas.
Find the 'Copy file' action that is generating the 400 error, click the three dots (More commands) in the upper right corner of the action block, and select 'Delete'.
Click 'New step', search for 'SharePoint', and select the 'Create file' action from the list of available actions.
Set the 'Site Address' to the dynamic URL of your newly created Team's SharePoint site. For the 'Folder Path', select or type the destination path (e.g., /Shared Documents/General).
Specify the 'File Name' (including the .xlsx extension) and map the 'File Content' dynamically using the output from a previous 'Get file content' action. Save and test your flow.

Manage and Edit Your Excel Files Efficiently with WPS Office
While Power Automate manages your SharePoint and Teams workflows, WPS Office serves as a highly compatible, lightweight, and free alternative to Microsoft Office for editing the very Excel spreadsheets you automate. Enjoy a familiar interface and comprehensive formatting tools without the burden of expensive subscriptions.
- 1. Download and Install: Download WPS Office for free from the official website and complete the quick installation.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheets, click 'Open', and navigate to your downloaded SharePoint .xlsx file.
- 3. Edit and Save: Edit your data using familiar formulas and formatting tools, then save it directly back in the standard .xlsx format.

Frequently Asked Questions
Why does Power Automate return a 400 Bad Request error when moving or copying files in SharePoint?
A 400 error generally indicates that the server cannot process the request. In the context of SharePoint file actions, this usually happens if the source file is missing or locked, or if the destination folder path is invalid or hasn't finished provisioning yet.
How long does it take for a new Microsoft Team's SharePoint site to provision?
Although the Microsoft Team itself is created almost instantly, the underlying SharePoint site and its default document libraries (like the General folder) can take anywhere from a few seconds to a couple of minutes to fully generate and become accessible to Power Automate flows.
Can I use the 'Move file' action instead of 'Copy file' to fix this?
No, the 'Move file' action will encounter the exact same 400 error if the destination folder has not yet provisioned. The most reliable solutions are to either use the 'Create file' action or insert a delay before the move/copy step.




