I have a flow that stores responses from an MS Form in a SharePoint List.
The first question in the Form allows the responder to attach files. I currently use a Parse JSON step (found online) which enables me to add attachments to the List item in a For Each loop that references outputs('Parse_JSON')['body'].
The flow fails at the Parse JSON stage when no attachments are included.
Is there a practical work around for this?
Parse JSON step code below for reference.
Thanks for reading
Matt
{
"type": "ParseJson",
"inputs": {
"content": "@body('Get_response_details')?['r52970a37d7f44534842ce10180188f96']",
"schema": {
"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"
]
}
}
},
"runAfter": {
"Condition": [
"SUCCEEDED"
]
}
}