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

 

Thanks!

5 REPLIES 5
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.

aluProjectum
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

kbirstein
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!

Courtenay
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:

 

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

tianaranjo
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

Announcements
firstImage

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.

firstImage

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.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

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: