cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cll_MTS
Frequent Visitor

Create word doc from sharepoint list

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.

 

Error Details

A file with the name FD_DocumentLibrary/CeilingAmounts.doc already exists. It was last modified by i:0#.f|membership . . . . 

 
 

 

2 REPLIES 2
v-litu-msft
Community Support
Community Support

Hi @cll_MTS,

 

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.

 

Best Regards,
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?

 

  1.  A file with the same name is currently being saved to this site.  Change the filename and try to save again.
  2. A file with the same name is currently being saved to this site.  Change the filename and try to save again.
  3. Succeed
  4. A file with the name DocumentLibrary/Amounts.doc already exists.
  5. A file with the name DocumentLibrary/Amounts.doc already exists.
  6. A file with the name DocumentLibrary/Amounts.doc already exists.
  7.  A file with the name DocumentLibrary/Amounts.doc already exists.

Capture.PNG

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (6,035)