Copy large files with Power Automate Microsoft Flow createfile failing 1

When you work with large files in Power Automate you will find that there are some things that you need to consider when you copy large files.

General setup

 In this post I’m looking at a few common issues. I’ve created a document library to which I upload a very large file.

Uploading large file

My flow identifies that a file is being uploaded and on creation my flow starts. Note that my file is still uploading at this time.

Get file content file size limits

After a while I get the following error when I try to get the content

BadRequest. Http request failed as there is an error: 'Cannot write more bytes to the buffer than the configured maximum buffer size: 104857600.

BadRequest. Http request failed as there is an error: ‘Cannot write more bytes to the buffer than the configured maximum buffer size: 104857600.’.

I then made my file slightly smaller.

Create file, file size limits

Once I uploaded a slightly smaller but still large file my get file content worked fine, but now when I tried to create anew file with the content I got a RequestEntityTooLarge.

In the details I was given a 413 error with the description of The request is larger than 94371840 bytes.

Create file failing

Copy large files

As I’m trying to copy a file with the get file content and create file actions I could also consider the copy file action.

Copy large files
Copy large files

The copy file action simply works. Why? the answer is quite simple. The API is struggling when we first collect all the content of the file and then send the content back through the two actions.

This means that the content of the file will twice travel between your flow and SharePoint. When a copy file is used only a file reference is sent.

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

One thought on “Copy large files with Power Automate”
  1. Thank you so much for this. This is very timely info as I’m working on my first Flow to copy/create files uploaded from PowerApps to a SharePoint list into a document library.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue reading