Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

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.



PowerApps Staff Samuel
PowerApps Staff

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.

Level: Powered On

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? Smiley Happy

Level: Power Up

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!

Level: Powered On

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:


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:

Level 8

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


Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.


Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 363 members 4,363 guests
Please welcome our newest community members: