Oct 19 2020
01:21 PM
- last edited on
Aug 03 2023
10:31 PM
by
TechCommunityAP
Oct 19 2020
01:21 PM
- last edited on
Aug 03 2023
10:31 PM
by
TechCommunityAP
I have a Microsoft Form which has an option to attach a PDF. I also have a Flow which populates a Sharepoint List with the answers from the Form.
Is there a way to have any of the PDFs (attached to the Form), to also populate in the List?
Oct 20 2020 03:02 AM
@SeanS yes in your flow you can get it to add the PDF as an attachment to the list item in SharePoint via your OneDrive.
The images and instructions below are from a live applications support ticketing system I built at my company.
After your Forms "When a new response is submitted" and the "Get response details" action add a Parse JSON action. In the Content field, from the dynamic content select the question which ypou've used in your form for the attachment. For the schema field copy and paste the code I've added below the image:
{
"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"
]
}
}
Next, add a Get file content using path action. Forms will save the file to your One drive in the following folder /apps/Microsoft Forms/{the name of your form}/Question
After Question add a / then the following expression in the dynamic content Expression tab:
Add the SharePoint Create item action. After that, to make sure the Create item action has time to complete I put in a short delay action:
Next, add an Apply to each. From the dynamic content select Body from the Parse JSON section.
Next, add a SharePoint Add attachment action:
For the ID field select ID from the Create item section of the dynamic content.
For the Filename field select name from the Parse JSON section of the dynamic content.
For the File content field select File content from the Get file content using path section of the dynamic content.
I've then got other actions further down but those are the steps for attaching the file to the SharePoint list item. Hope it helps.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Oct 20 2020 05:12 AM
I actually found this post yesterday and got it working perfect. Thanks so much for your help.
Sean