cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Create a file in SharePoint when a new item is added

I created a flow that creates a new file in a SharePoint document library any time a new item is added to a list in the same site. It appears to be working, but is there any way to specify what type of file is created based on the document content types available in that library? I am looking to generate a OneNote file based on a template that's been defined as a document content type.

 

Thanks!

5 REPLIES 5
Highlighted
Power Apps
Power Apps

Re: Create a file in SharePoint when a new item is added

Not sure it exactly meets your scenario, but I was able to get something similar working by using "on new list item" as the trigger, followed by a "get file from path" (pointing to some template file), followed by "create file" which created a file based on the ID of the list item and used the content output from the "get file" action (weirdly, this does require specifying the file type in the name of the new file). 

 

You could probably set up multiple template files and look them up by path where part of the file name matches up with a value in the sharepoint list item. Doing that for multiple file types could be tricky though. If you only have two file types, you can probaby accomplish it with a condition, so based on a field in the list item save the new file as one type or another. Unfortunately, you can't nest conditions or do else-if branches in the editor, so if you have more than two possible file types, you'd need to set up multiple flows for this. They can all listen on the same list, but add a condition to only process sharepoint items with a certain value.

Highlighted
Advocate I
Advocate I

Re: Create a file in SharePoint when a new item is added

I'm currently trying to create a flow that pretty much does what you are describing - is it possible for you to share how you created yours? 🙂

Highlighted
New Member

there Re: Create a file in SharePoint when a new item is added

Is there any detailed explanations with examples of the actions and conditions anywhere? The extremely cursory documentation is useless. Why does Microsoft spend so much money on developing these products and then refuse to write adequate documenation? Back to Nintex!

Highlighted
Advocate II
Advocate II

Re: there Re: Create a file in SharePoint when a new item is added

Hi there,

 

I just wanted to update this thread.

 

It is now possible to do this within flow using Parserr. We have just joined the Flow community and wanted to thank everyone in the flow team for making this possible:

 

https://flow.microsoft.com/en-us/services/shared_parserr/parserr/

 

Parserr allows you to turn incoming emails into useful data to use in various other 3rd party systems.You can use to extract anything trapped in email including email body contents and attachments.

 

Have a look here: https://parserr.com

Highlighted
Continued Contributor
Continued Contributor

Re: Create a file in SharePoint when a new item is added

Do you know how to have the file name for the new file being created by equal to that of the list it is being created from?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,776)