
Good morning, everyone. I've created a workflow in Power Automate that begins when people respond to a Microsoft Forms survey. However, the Forms tool doesn't provide the option for respondents outside of the organization to attach files.
To work around this limitation, I've designed a workflow where, when a person responds to the form, an email is sent to them, requesting that they attach the necessary document. Simultaneously, the workflow creates an item in a SharePoint list. My challenge is ensuring that these attachments are linked to the same list entry alongside the form responses.
For example:
Response 1 - Attachment 1 (attached in response to the email sent to the person)
Can anyone assist with this?
Hi @Guyfuture ,
Here's some framework that I think will help you, please review. In this example, I have a simple form that has a question 'Add a file'.
Next I use Parse JSON to expose the attachment details, shown below. To use Parse JSON, you copy the json from the get response details output and then click on 'Generate from sample' button and paste in your json copied from the previous step.
Note: to get the sample json, look at the output from any run from the get response details. You will end up with a schema that looks like the below image.
The next action is Get Items. This is the action that will match the existing item. Here, I use the email from the form submission to match the email in the list item.
The apply to each takes the results from Get Items and uses Update item. For each found item in Get Items, we Update Item and add a link to the attachment.
So the key here is to update an item, you need to match an existing item using a previously submitted field. I typically use email address when the data comes from a form.