cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Continued Contributor
Continued Contributor

Create file in SharePoint Photo library when SharePoint list file is created

Greetings, 

 

I would like a Flow that would create a new (photo) folder file in a SharePoint library.  The file would be created when a new form is submitted in the SharePoint libray.  I would like the folder being created to be named the same as the list item that it is being generated from.  Is that possible?  If so, how do I enter the code in the File Name and File Content fields of the flow?  Thank you, in advance, for the help.

2017-10-29_10-45-36.png

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Create file in SharePoint Photo library when SharePoint list file is created

Hi @tianaranjo,

 

Could you please explain a bit for what the form is used for, and the related SharePoint list item?

If the form is used to generate new sharepoint list item, then we could take use of the following trigger:

SharePoint->When an item is created

Then choose the corresponding List item field within the Folder path, for the File Name and the File Content, Just typing "Text", we could add a delete file action to delete it if it is not needed, follow the steps below:

54.PNG

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Continued Contributor
Continued Contributor

Re: Create file in SharePoint Photo library when SharePoint list file is created

Michael,

 

Thank you for the reply.  The SharePoint (Infopath) form will be utilized for inspections.  The inspector will need to upload photos.  The photos will exceed the allowable limit for photos within the SharePoint list item - so, I would like to have a file created in a SharePoint photo library with the same fileName as the SharePoint list item. I will not be deleting any files. 

 

In addition to establishing a Flow that would create a photo folder, I would then like to create another flow that would show the link in the SharePoint list (where the original item is created).   

 

Again, thank you for the assistance.

Highlighted
Continued Contributor
Continued Contributor

Re: Create file in SharePoint Photo library when SharePoint list file is created

If I understand your scenario correctly, this is going to be a bit challenging. If you're using an InfoPath form library, then getting the attachment from the infopath from isn't easy, as the file is embedded in the form itself. The solution might be something along the lines of calling an Azure function that programatically retrieves the file from within the infopath form.

 

Though, is there any reason this was built with an InfoPath library? If you can convert this to a list, and use the list attachment feature rather than the InfoPath attachment feature, then this is a pretty trivial flow to set up. Likewise a button flow can pretty easily capture a photo and get it added to a library, without using InfoPath at all.

Highlighted
Continued Contributor
Continued Contributor

Re: Create file in SharePoint Photo library when SharePoint list file is created

Mike,,

 

I do not wish to copy the attachment over, I simply want to create a folder in a separate (photo) library, naming it the same as the list item that was created.  The user won't attach any photos to the Infopath library.  

However, I didn't consider your alternative and will look into that.  Thank you.  

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.

Users online (6,875)