'Creating File to sharepoint based on content type

I am trying to create some files based on content types set in a library that triggers when item is added to a list.

I am using as an action based on a tutorial that i found the "create item" and i place "Documents" on the list selection so the flow gives me the content type Id and all other columns that are needed.

All looks fine but i get an error of:

To add an item to a document library, use SPFileCollection.Add()\r\nclientRequestId: b008247b-f143-44a7-b914-316fcd9eb7d0\r\nserviceRequestId: df3cbf9e-00cc-8000-97f0-36e3a5627bdb

Is there anything that i can do to edit the flow?



Solution 1:[1]

You can upload your own template file to your content types. After that you set up your flow as follows:

  • Item in list created (trigger action)
  • Get your file content using "get file content" action (you can of course use several content types with different template files)
  • Create a new file using the "Create file" action giving it the file Content of your previous action

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jirayia