Forum Discussion
How do i add attachments from Microsoft Forms onto Sharepoint List
- Jul 04, 2021Don't use a template to build this flow which will put in that first apply to each which is not needed and usually causes problems. Build it from new going straight from When a new response is submitted to get response details.
Thank you so much. I am going try it now. It worked like a bomb.... You are freaking super awesome .... Thank you soooooo much
- GBeulenNov 08, 2021Copper Contributor
Sur76 So what did you do in the end, exactly? In my Get Response Details it never shows anything about the attachement from the Form?
- RobElliottNov 08, 2021Silver Contributor
GBeulen no it won't, the steps you need to add a file uploaded to a Microsoft Forms form to an attachment in a SharePoint list are as shown below.
Your trigger is the Forms "when a new reponse is submitted". The first action as always is the Forms "get response details":
You now need to add a "Parse JSON action". In the content field select the question from your form where you asked the user to upload the file.
The schema field will work with the following:{ "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "link": { "type": "string" }, "id": { "type": "string" }, "type": {}, "size": { "type": "integer" }, "referenceId": { "type": "string" }, "driveId": { "type": "string" }, "status": { "type": "integer" }, "uploadSessionUrl": {} }, "required": [ "name", "link", "id", "type", "size", "referenceId", "driveId", "status", "uploadSessionUrl" ] } }
The file is always saved to your OneDrive in the
/Apps/Microsoft Forms/YourForm/Question folder so in a OneDrive "get file content using path" action add that and follow it with the following expression:
first(body('Parse_JSON'))?['name']Next, create an item in your SharePoint list:
Next, add an "apply to each" action and in the first field select Body from the Parse JSON section of the dynamic content box.
Finally, inside the apply to each add a SharePoint "add attachment" action. In the Id field select ID from the create item section of the dynamic content. In the File name field select name from the Parse JSON section of the dynamic content box. In the File content field select File content from the "get file content using path" section of the dynamic content.
Rob
Los Gallardos
Microsoft Power Automate Community Super User- keenan_meadowsAug 20, 2024Copper Contributor
How do I find these settings? I understand this answer is a few years old, but I cannot duplicate the instructions here because I am not able to find where to put the trigger in the forms.
Thanks.