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

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

 

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

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (85,064)