Jul 04 2021 03:31 AM
Hello.
Trust everyone is safe and well .
I have been trying to follow the video on how to add attachments from forms to sharepoint list but i am not doing something right as i keep getting this error.
Any help will be welcome. Thank you
This is the make up of my flow
On the Parse Json - i am not sure what to add here - i copied and pasted the schema provided
Jul 04 2021 04:49 AM
SolutionJul 04 2021 08:13 AM - edited Jul 04 2021 09:11 AM
Thank you so much. I am going try it now. It worked like a bomb.... You are freaking super awesome .... Thank you soooooo much
Nov 08 2021 07:02 AM
@Sur76 So what did you do in the end, exactly? In my Get Response Details it never shows anything about the attachement from the Form?
Nov 08 2021 07:41 AM
@GBeulen no it won't, the steps you need to add a file uploaded to a Microsoft Forms form to an attachment in a SharePoint list are as shown below.
Your trigger is the Forms "when a new reponse is submitted". The first action as always is the Forms "get response details":
You now need to add a "Parse JSON action". In the content field select the question from your form where you asked the user to upload the file.
The schema field will work with the following:
{
"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"
]
}
}
The file is always saved to your OneDrive in the
Next, create an item in your SharePoint list:
Next, add an "apply to each" action and in the first field select Body from the Parse JSON section of the dynamic content box.
Finally, inside the apply to each add a SharePoint "add attachment" action. In the Id field select ID from the create item section of the dynamic content. In the File name field select name from the Parse JSON section of the dynamic content box. In the File content field select File content from the "get file content using path" section of the dynamic content.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Nov 09 2022 03:21 AM
You are a genius, that has just solved an issue for a beginner, thank you
Feb 25 2023 11:21 PM
May 23 2023 07:40 PM
@RobElliott , why do I still get error message even though i have change to my path as below
this is my path (group sharepoint)
.
even i have tried so many different method including yours, stil get error message.
And this is my connection. is it because of this?
Please advise what needs to be done.
Thank you in advance.
Jun 27 2023 03:58 AM
Hi Rob,
I followed the steps as you mentioned. however, I get an error "A potentially dangerous Request.Path value was detected from the client (?)." this error heppens on the "Get file content using path" step, where my file path is my sharepoint folder on the company domani. any idea how to resolve this? thanks.
Jun 27 2023 08:51 PM
Jul 03 2023 03:58 AM
Thanks for your guidance!
I have followed your suggestion to set the flow and it can transfer the attachments to SharePoint List successfully. But when I try to attach one photo and one video in the form and submitted, I can only open the photo but not the video in the SharePoint list. And when I attach only the video in the form, it is ok to open the video.
Just wonder if there is any extra step I have to build in in my flow in order to solve this issue?
Thanks!
Regards,
Ann
Dec 10 2023 11:01 AM
@RobElliott i am unable to use picker for selecting one drive folder.
Dec 12 2023 03:07 AM
@rlehrawaaca why not? You can just type the folder path in the field:
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP (and classic 1967 Morris Traveller driver)
Jan 04 2024 09:59 AM
This was great, but what if you want to have the option to include or not include the attachment from the Form to List. I mention this because when I used your workflow and don't attach something in the MS Form, then I get an error.
Jan 04 2024 10:25 AM
What I do is to go to settings for the actions that relate to the optional file upload, go to settings and select Configure Run After and select Failed as well as is successful. The following images are from our IT Support Ticketing System where uploading a file is not mandatory.
So even if the individual actions actions relating to the file upload fail the flow continues to run and will be shown in the run history as succeeded.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
Feb 15 2024 08:38 AM
Feb 15 2024 08:50 AM
@rolaogomes That;'s a SharePoint get file content using path action which I renamed.
Feb 15 2024 10:44 AM
@Rob_Elliott so you have 2 actions for get file?
Feb 15 2024 01:06 PM
@rolaogomes yes because they're getting different files; one is for the uploaded file and the other is to get the logo which goes into the confirmation email we send.
Jul 04 2021 04:49 AM
Solution