Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Error 'InvalidContentRangeHeader' when creating SharePoint file with extension


I have a strange issue with Power Automate. When using the action to create a file in SharePoint, with the file extension .docx:



InvalidContentRangeHeader. The response to partial content upload request was not valid. The returned range header value 'bytes=0-91607' is not in the expected range of '0-89363' with unit set to 'bytes'.



But the file is created properly, only the flow fails. If I remove the .docx extension in the file name field, it works without any issue. The same type of set of actions is used in another flow and it works well. Any idea?


thank you


Accepted Solutions

check this article out.  I did what they suggest and it works


Be nice if all these questions and answers were in one place! 

View solution in original post

Helper V
Helper V

I have the exact same problem 😞


About ½ year ago I build a flow that runs smooth and with no errors. I needed the same flow on another site collection and builded up the new flow exactly like the old flow, but it is making the same error, like yours, but the files is created anyway. 



I need to continuing using the flow to update metadata, but that is not possible when the flow is failing :(. Could this be a bug?



Frequent Visitor

It works with .doc for me, but this is not what I want.

Same for me, other flows can run with no issue, looks indeed like a bug.


It is also a problem with Excel files. This is total crazy. Ask Microsoft and they say it is a feature!!! 😠



I am seeing the same issue.  Flow fails but file created successfully.   This is kind of a problem that should be fixed.  I guess in the mean time i can add a check to be sure the file is there and notify me if it isn't, otherwise i'd need to check each run manually.

I'm also having this problem, and it works fine in my dev environment - I only got the error today when I deployed the flow to Test.  Does anyone have any idea how to work around it?


** edited to add that it works if I change the extension to doc instead of docx, but I need to convert the file from word to pdf later and that doesn't work with a .doc extension 😞

Frequent Visitor

anyone figured out a solution to this yet? I am having same issues

check this article out.  I did what they suggest and it works


Be nice if all these questions and answers were in one place! 

Thank you I'll try that - I did notice that Microsoft says there is a support issue regarding Sharepoint in Europe so had assumed that was what was causing the issue!

That did it for me @pdominey  - THX a lot 😎



Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,269)