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 IV
Helper IV

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! 

View solution in original post

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

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (49,260)