I followed the instructions in the Intermediate | Flow of the week: Create PDF Invoices Using Word Templates with Microsoft Flow (Jonathon Levesque) up to and including the create file after populating a Microsoft word template (I did not include the .pdf conversion part). The Flow executes perfectly up to the Create File action, where it errors out. Error Details state that "a file with the name XXXXX already exists. The Flow fails on, what appears to be, each line item (seven total) in my SharePoint List. The document is eventually created in the document library. But, the run history status indicates "Failed." Any ideas or suggestions on how to fix the problem would be greatly appreciated.
A file with the name FD_DocumentLibrary/CeilingAmounts.doc already exists. It was last modified by i:0#.f|membership . . . .
Cause there already exist an same name file in the library.
If you want to create a new file with updated content, you could add a delete file action before the create file.
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Team _ Lin Tu,
Thank you for your reply.
I am not sure that the problem is with an existing file in the folder as I tried your suggestion and got the same results.
Here is a better explanation of what is happening. I have seven items in my test list, and it appears, by the error details, that a file is being generated for each line item. The flow eventually runs and creates a file with each item included in a table, but, as you can see by the screen capture, the flow fails on all but one of the seven items. The error details messages are below. Also, when the file is finally created, one of the columns (number) does not populate. How do I prevent the flow from trying to generate a file for each line item in the list?