How to overwrite files using the create file action in Power Automate

In this post we detail to to resolve an error with the create file step in Power Automate that occurs when updating files in SharePoint Online.

In this post we explore a common error experienced when trying to update existing files in SharePoint using the create file step in Power Automate – and how to resolve it.

The problem

I recently ran into an issue seemingly many others have encountered when trying to update an existing file in SharePoint using the create file step in Power Automate. When running my flow, I received the following error:

Bad Request error in Power Automate when trying to use the create file step to update an existing file in SharePoint.
  • Bad Request status: 400
  • Message: A file with the name [NAME OF FILE] already exists. It was last modified by [NAME OF USER] on [DATE]

The solution

The solution to this has already been shared a fair few times via the Power Automate blogs, but here it is:

  • Press the ellipsis … > settings within the create file step
Open the ellipsis and press settings within the create file step.
  • Scroll down until Content Transfer > set allow chunking to off
  • Save and re-run your flow

That’s it, now when I use the create file step to update existing files, it runs successfully!

Note: Chunking of content is used for splitting up large content for downloads/ uploads. You may need to consider this before turning off chunking in your flow. More information on chunking can be found here.


5 responses to “How to overwrite files using the create file action in Power Automate”

  1. I turned this off and it is still telling me I need to check it out first, but can’t figure out how to grab properties of a different site with the PDF name as opposed to where the trigger is being run from (Word version changing status to approved).

    1. Hi, I’m not sure if this comment directly relates to the post, but can’t you just get files or file properties within the flow then use that dynamic content?

  2. Doesn’t work with this enabled.

  3. It did for me, what happens in your scenario

  4. […] wrote a separate post on how to overwrite files using the create file action, but basically the answer was to turn off chunking within the actions […]

Leave a Reply

Recent posts

Discover more from SharePoint Stuff

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

Continue reading