Submit Microsoft Form → Add task to a Planner board → Copy over any attachments
The most challenging part of creating this Power Automate flow was getting the attachments to carry over. I went in thinking it would be very simple, but soon learned it was moderately complex. Keep scrolling to read about how I reasoned through and got my flow working properly for multiple scenarios.
1
Building the basic flow
Basic flows in Power Automate are pretty easy and intuitive to make. All I had to do was search for each component, add it to my flow, and map the outputs to the right field.
2
Learning some basic JSON
To add multiple attachments, I followed this post which involved creating an array of the attachment data. I first had to add a step to parse the attachment information, then append the data for each attachment to the array. Once I had the array, all I had to do was select it as the input for the references field in the appropriate step.
3
Troubleshooting
After testing the flow with some different scenarios, I realized it only worked if there were attachments submitted with the Form. If no attachments were submitted, I would get an error. I had missed an important step! I need to check if the user uploads any attachments. This was achieved by adding a simple Condition step.
4
Error-proofing
Humans are unpredictable, so I always account for entry errors. One important error I saw when performing testing with many different scenarios is that if someone puts over 255 characters in the title field, the flow throws an error and doesn't create the task! Since Microsoft Forms currently doesn't allow character limits to be set on text fields, I built in a condition step that would check if the input was over 255 characters. If yes, it creates a substring of the field and puts that as the title of the task.