Hello, I am receiving the following error when files are not uploaded on a Microsoft Forms Survey. Not all responses require a file attachment, so I really need the flow to work either way. I set up a condition to give it a path to go either to Yes or No if depending on upload or not, but now it hangs up in the Apply to Each and I am stuck. I have tried several different conditions in this section, but none seem to work, and I am wondering if I am going the right direction. I have learned a ton in these forums just with searches, so I am hoping the experts here can assist me on this one. Thank you all!!!
Solved! Go to Solution.
Unfortunately the above only caused a failure right at the Parse JSON. I did some further searching in the forums and found a method by another user here. @yashag2255 nailed it with his blog post at Working with Files on MS Forms in MS Power Automate (bythedevs.com)
If anyone wants to pare out the attachments from Microsoft Forms and send an automated email - this is the link you want to read! I have a survey for over 150 people that the results need to go to around 25different people in different combinations based on their region, role and supervisor. This works flawlessly to make it happen. Kudos to you.
Thank you both for your assistance!
All the best!
Hi @SINX ,
You may try to add a compose action before 'Parse JSON'.
-Add 'Compose' action, select the necessary function or dynamic content. Run the flow.
- Then use the output of 'compose' action in 'Parse JSON'
-Click 'Generate from sample' paste the output into 'Parse JSON'
If I have answered your question, please Accept the post as a solution.
If you like my response, please give it a Thumbs Up.
Regards,
Serbay
Deleted duplicate response.
Thank you for the reply Serbay! I will give this a try, but could you please help me understand? What is the goal of the Compose Function in this case? The Parse JSON is working perfectly and pulling the attachments needed from the survey. The append to It is only when there are no attachments that it fails at the Apply to Each 2 / Append to Array Variable due to there being no files in the requested location.
In the Condition to go to Append to Array I am using
Hi @SINX ,
It seems you should be handling NULL values for Parse JSON. By this NULL values passed will not cause an error.
As an example :
"Name": {
"type": [
"string",
"null"
]
}
Regards,
Serbay
Would I add this to this code in the Parse JSON?
hi @SINX ,
try to remove types ;
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {},
"link": {},
"id": {},
"type": {},
"size": {},
"referenceId": {},
"driveId": {},
"status": {},
"uploadSessionUrl": {}
},
"required": [
"name",
"link",
"id",
"type",
"size",
"referenceId",
"driveId",
"status",
"uploadSessionUrl"
]
}
}
Unfortunately the above only caused a failure right at the Parse JSON. I did some further searching in the forums and found a method by another user here. @yashag2255 nailed it with his blog post at Working with Files on MS Forms in MS Power Automate (bythedevs.com)
If anyone wants to pare out the attachments from Microsoft Forms and send an automated email - this is the link you want to read! I have a survey for over 150 people that the results need to go to around 25different people in different combinations based on their region, role and supervisor. This works flawlessly to make it happen. Kudos to you.
Thank you both for your assistance!
All the best!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.