cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Store attachments from Microsoft Forms into Sharepoint List

What I am trying to accomplish is when a form response is submitted create a sharepoint list item. The issue I am running into is that there is a question to attach files and I am unsure of how to capture that in the sharepoint list. Is this possible? I was thinking of potentially creating a column, that would store a shareable link, since it seems the attachments from the form are being stored in my OneDrive account. Thanks in advanced for any help. 

 

-E

9 REPLIES 9
Highlighted
Super User III
Super User III

Re: Store attachments from Microsoft Forms into Sharepoint List

Hi @--EKM, currently you can't add attachments to a form in Microsoft Forms so I'm not sure how you are going to get those attachments.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Highlighted
Frequent Visitor

Re: Store attachments from Microsoft Forms into Sharepoint List

@RobElliott Hi, 

 

I am not sure when this feature was added but I can confirm that it is currently supported. Please refer to the image below. 

 

-E

attachmentsinforms.PNG

Highlighted
Super User III
Super User III

Re: Store attachments from Microsoft Forms into Sharepoint List

Well that's good news , I know they were working on it and so it looks as though it's rolling out although it's not arrived in my tenant yet.

Rob
Los Gallardos

Highlighted
Dual Super User III
Dual Super User III

Re: Store attachments from Microsoft Forms into Sharepoint List

Hey @--EKM 

 

Can you share a sample output of the submitted form in flow? I just want to see what is the type of attachment that is being returned. 

 

If it is a file content in base64 format, you can create an item in flow and then add an action to add an attachment to that item and use the binary function to create the file content for that attachment. 

 

If the file upload question creates a link to the file saved in onedrive, you can create a multiple lines of text column in SP list and save the URL over there. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: Store attachments from Microsoft Forms into Sharepoint List

Hey @yashag2255 , 

 

I'm not sure how to see how it is saving the file from the outputs. What I tried to do was just create a column to save the "response" of attaching files and it gave me a long link which does contain the link to the file along with a lot of other stuff. This is the output it gave me:

[{"name":"jsn_logo_blk_rgb_"MyName","link":"https://"CompanyName".sharepoint.com/personal/"MyName"/Documents/Apps/Microsoft%20Forms/"FormName"/Question/jsn_logo_blk_rgb_"MyName".jpg","id":"","type":null,"size":50911,"referenceId":"","driveId":"","status":1,"uploadSessionUrl":null}]

 

Sorry if thats confusing to read, I tried to exclude any personal information. However, what is highlighted in red does link directly to the uploaded file. How do I get sharepoint only to save what is after "link" and before "id". I think that would solve my issue for one file and if there were any other files to concatenate the outputs. Thanks for any help. 

 

-E

Highlighted
New Member

Re: Store attachments from Microsoft Forms into Sharepoint List

I'm having same issue... looks like a custom formula is needed to strip out the url.. did you get it working?
Highlighted
Frequent Visitor

Re: Store attachments from Microsoft Forms into Sharepoint List

@BowerPaul / @--EKM , I faced the same issue/requirement and was able to solve with 'Parse JSON' action.

 

In order to setup your 'Parse JSON' action, you'll first want to grab a sample JSON output from the attachments field in your 'Get response details' action. After generating, you'll be able to reference/use the 'link' from Dynamic content as with other properties.

 

Check out around the 6 minute mark of this great post/video from Gareth Hunt.

Saving Attachments with Microsoft Forms and Power Automate (Flow) 

 

Hope that helps! 

Highlighted
Dual Super User III
Dual Super User III

Re: Store attachments from Microsoft Forms into Sharepoint List

Hey All! If you are using a simple form, you can follow this article: https://www.bythedevs.com/post/working-with-files-on-ms-forms-in-ms-power-automate

 

If using group forms, follow this one: https://www.bythedevs.com/post/working-with-files-on-ms-forms-group-form-in-ms-power-automate

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: Store attachments from Microsoft Forms into Sharepoint List

Thanks @yashag2255 for the writeups. I implemented similar condition to check if attachments exist before parsing the JSON. At that point, one can append the body('Parse_JSON')['link'] results to an array variable, and then add that to any 'Send an email' or SharePoint 'Create item' as appropriate.

 

NOTE: Similar to the original post/question, I only parsed for 'link' as the Group Form attachments will already exist on the target SharePoint site. Added 'Attachments1', 'Attachment2', 'Attachment3' hyperlink columns to the SharePoint list, and then used the following Expression in Power Automate to add the attachment links URLs to the SharePoint list item (if they exist):

 

Attachment1: if(greater(length(variables('Attachment Links Array')),0),variables('Attachment Links Array')[0], '')

Attachment2: if(greater(length(variables('Attachment Links Array')),1),variables('Attachment Links Array')[1], '')

Attachment3: if(greater(length(variables('Attachment Links Array')),2),variables('Attachment Links Array')[2], '')

 

Thanks again to @yashag2255 and Gareth Hunt for their contributions.

 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (7,531)