Forum Discussion
Error with 'Upload File' field from MS Form to SP list
Check the below steps and let me know if this works for you.
1)Start by setting up a trigger for your Microsoft Form using "When a new response is submitted".
2)Retrieve the details of the form response using the "Get response details" action. This action helps to retrieve the individual answers submitted by the respondent.
triggerOutputs()?['body/resourceData/responseId']
3) Add action, "Initialize variable" and create variables with array type and store the upload type questions in the value.
4) Then loop the questions to get a attachments and Include action, "Parse Json" to extract the link from Json
items('Apply_to_each_2')
outputs('Each_Question_Files')
You can use the below schema to parse json.
{
"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"
]
}
}
5) As a final step, add action "Create Item" in SharePoint to create the item. Use the expression,
first(body('Parse_JSON_2'))?['link'] to upload the link in the hyperlink column.