How to resolve “A file with the name already exists” error in Power Automate
It may have happened to you that when you want to use the SharePoint “Create File” action in your flow in Power Automate, you receive an error message similar to the following :
A file with the name PrintSheet/TSReport.pdf already exists. It was last modified by i:0#.f|membership|USERNAME@TENANT on 10 Oct 2022 16:16:32 -0700.
To fix this problem, you need to go to the action setting and in “Content Transfer” section, switch Off the “Allow Chunking” option as follows :
1- Click the ellipses on the “Create File” action
2-Click on the Settings
3-Under Content Transfer, toggle Off “Allow Chunking”.
4- Click Done.
Note : “Allow Chunking” is used for splitting up large content for downloads or uploads. Please consider this before turning off chunking in your flow. (More information)
If your file size is larger than the Azure Logic App threshold (30MB), then I recommend you use a “if condition” action in your flow to check the file name in SharePoint library with the same name before creating the file.
Hope it helps!