SharePoint Document Issues

How to Fix Power Automate SharePoint Copy File 400 Error

Elise WilliamsElise Williams Nov 3, 2026 868 views

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.

How to Fix Power Automate SharePoint Copy File 400 Error
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.
Before you start

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.

Solution 1Recommended

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.

1
Edit the Power Automate Flow

Open your Microsoft Power Automate dashboard, locate the failing flow, and click 'Edit' to open the workflow canvas.

2
Remove the Failing Action

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'.

3
Add the Create File Action

Click 'New step', search for 'SharePoint', and select the 'Create file' action from the list of available actions.

4
Configure Site and Folder Paths

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).

5
Map the File Content

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.

Use the SharePoint Create File Action Instead of Copy File
Alternative Method: Adding a Delay: If you must use the 'Copy file' action, you can insert a 'Delay' action (from the Schedule connector) for 1 to 2 minutes right after the Team creation step. This gives SharePoint enough time to provision the default folders before the copy is attempted.
Free Microsoft Office alternative

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. 1. Download and Install: Download WPS Office for free from the official website and complete the quick installation.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheets, click 'Open', and navigate to your downloaded SharePoint .xlsx file.
  3. 3. Edit and Save: Edit your data using familiar formulas and formatting tools, then save it directly back in the standard .xlsx format.
Fully compatible with Microsoft Excel (.xlsx) file formats used in your SharePoint flows.Lightweight application that opens large spreadsheets instantly without draining system resources.Familiar tabbed user interface ensuring a seamless migration from Microsoft Office.Built-in PDF tools and cross-platform cloud collaboration features.
QA img-9

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.