Showing results for 
Search instead for 
Did you mean: 
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.



Power Apps
Power Apps

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.

Advocate I
Advocate I

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? 🙂

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!

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:


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:

Continued Contributor
Continued Contributor

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

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (2,260)