Copy large files with Microsoft Flow 1

Copy large files with Microsoft Flow

When you work with large files in Microsoft Flow you will find that there are some things that you need to consider. In this post I’m looking at a few common issues.

General setup

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

Buffer error

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 file

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 file instead

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 Flow and SharePoint. When a copy file is used only a file reference is sent.


One thought on “Copy large files with Microsoft Flow

  1. commented on May 31, 2019 by dhock2017

    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.

%d bloggers like this: