MS Forms File Upload to SharePoint

Поділитися
Вставка
  • Опубліковано 17 січ 2025

КОМЕНТАРІ • 84

  • @shubhabratadey
    @shubhabratadey 5 місяців тому +3

    In spite of been 3 years old, this is by far the best video on this topic. I have been searching for so long and all the flows following other videos would give me errors. This worked flawlessly. Many thanks Chad...😁

  • @butterflyc72
    @butterflyc72 3 роки тому +4

    Finally - I found a video that actually got the outcome I was hoping for, thank you! I have worked on the flow all week trying to get the parsing to work, however - all the other ones didn't say "get file content metadata" - that was the thing, thank you! Now I got the item to also add the attachment to a SP list.

    • @cvkealey
      @cvkealey  3 роки тому

      Glad I could help!

  • @Rostaman1
    @Rostaman1 5 місяців тому

    You are amazing. I tried everything on the internet and yours was the only one that worked. Subscribed!

  • @E-TypistIncAdmin
    @E-TypistIncAdmin 3 роки тому +2

    I appreciate taking the time to make these videos. Key difference between yours and the ones that become excellent resources - you did not post a copy of the codes that you are using. Please include those on future posts. It saves a lot of time in other instructional videos because you can just say "the code is in the description, you can copy and paste, use as a template, etc." Thanks!

    • @E-TypistIncAdmin
      @E-TypistIncAdmin 3 роки тому +1

      Is this what you used?
      {
      "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"
      ]
      }
      }

  • @melonafrancis731
    @melonafrancis731 3 роки тому

    Thank You Chad for the great video. I tried it for the group forms and it worked perfectly fine. I was looking for this solution for a group form.

  • @jacopoferrariosardi
    @jacopoferrariosardi 3 роки тому

    Great video! Thank you so much for making it so clear and understandable. Awsome work.

  • @RussellSeibert
    @RussellSeibert Рік тому +1

    Great video. One catch I have found with this is if the filenames are the same your form will fail. Is there a way to change the filename to include a date and time stamp in the name upon submission to avoid having a duplicate?

    • @cvkealey
      @cvkealey  Рік тому

      You mean like this: ua-cam.com/video/PRwUn0aZysM/v-deo.html ?

  • @MOYO-der-Skipper
    @MOYO-der-Skipper 2 роки тому

    I am excited. With your help, I managed to implement an "IT HELPDESK" in teams. Thank you very much for this great video.

  • @enzym2004
    @enzym2004 Рік тому +1

    Great tutorial, thanks! =)

  • @iupetre
    @iupetre 2 роки тому +1

    Noob question: If you have different files for different questions, would you put the questions in the Parse JSON Content, or would you need to string together multiple Parse JSONs?

    • @cvkealey
      @cvkealey  2 роки тому +1

      It depends on your use case and requirements. If all the files are going to the same place, you can append the responses to an array variable and then parse that array. Or, if you need to send different files to different places, you can handle them individually. See this playlist for a more comprehensive and updated look at the various options: Microsoft Forms, Uploaded Files and Power Automate: ua-cam.com/play/PLMVyjgrWIGnwQowO2RsvHg0pZ8EozvAG-.html

  • @ElisaLeonelli
    @ElisaLeonelli 8 місяців тому

    Hi Chad, I followed every step of your excellent tutorial, but I'm unable to insert 'one driveid.id' as you suggested in the 'Get file metadata' action. These values don't appear in the dynamic content. The only values that appear are Body name, Body link, Body id, Body type, Body size, and Body reference id. Do you have any suggestions? Thank you

    • @cvkealey
      @cvkealey  8 місяців тому

      Try switching to the classic editor (toggle in the top right corner). Things show up a little different in the new editor, but if you switch to the old one, everything should look like it does in the video.

  • @rodrigoescobar2825
    @rodrigoescobar2825 3 роки тому +1

    Great video! I was wondering how could you obtain a sharing link from that Create a File from the For Each loop. Should it be inside the loop or outside if I want to be able to use the sharing link in a different action further down the flow? I´ve tried both and I can only use the "Current Item" from the loop in a further action or I get an error message. I would appreciate the help. Thanks in advance.

    • @cvkealey
      @cvkealey  3 роки тому +1

      The "create sharing link" action would need to be inside the loop. I would suggest storing it in a stringvariable as an href (e.g.: [file-name]). If you have just one file, it's fairly easy. If you have multiple files (in a particular question), you'd have to append to that string variable in a format that makes sense for your scenario. Or, in one project, I created a flow that saved all the files from a particular submission to a folder in SharePoint, then generated a single sharing link for that folder.

  • @carlosmelendez7520
    @carlosmelendez7520 8 місяців тому

    Hi Chad.. the files are sent as an attachement however, when I try to open them I get and error and even though I can download them, they are not opening

    • @cvkealey
      @cvkealey  8 місяців тому

      Are you certain you're including the file extensions? That's the most common issue.

  • @damir4624
    @damir4624 4 місяці тому

    This is great, thank you! How can I copy other questions in my form as metadata for the document in the library?

    • @cvkealey
      @cvkealey  4 місяці тому

      You need to add the column and then use an Update File Properties action to set the value appropriately.

  • @suzueli
    @suzueli 3 роки тому +1

    Great video, but what happens if the upload file is no required. I am having an error because the null is not working. Any solution?

    • @cvkealey
      @cvkealey  3 роки тому +1

      There are (at least) two ways to handle that. You could use a condition to check if the file upload question has a response (see ua-cam.com/video/fSeGEBEs-kA/v-deo.html). Alternately, you could use the "configure run after" property/setting (see ua-cam.com/video/jBTmX0cm6NU/v-deo.html). Either one will work if implemented correctly. Both can be a little tricky, so pay close attention to what's shown in the videos.

    • @cvkealey
      @cvkealey  2 роки тому +1

      There are (at least) two ways to handle that. You could use a condition to check if the file upload question has a response (see ua-cam.com/video/fSeGEBEs-kA/v-deo.html). Alternately, you could use the "configure run after" property/setting (see ua-cam.com/video/jBTmX0cm6NU/v-deo.html). Either one will work if implemented correctly. Both can be a little tricky, so pay close attention to what's shown in the videos.

    • @suzueli
      @suzueli 2 роки тому

      @@cvkealey thanks i’ll try

  • @ashvinsaini01
    @ashvinsaini01 2 роки тому +1

    Very nice video

  • @russco1971
    @russco1971 2 місяці тому

    Hello, when I submit my form with a PDF attachment it doesn’t save as a PDF. Is there something different I need to be doing in Power Automate when submitting PDF documents via the form?

    • @cvkealey
      @cvkealey  2 місяці тому

      Nope, nothing different. Check the run history of the flow to ensure you're using the right property to include the file extension for the attachment.

    • @russco1971
      @russco1971 2 місяці тому

      @ thank you I’ll give that a go 👍😎

  • @practicalphysicswithwaruna2382
    @practicalphysicswithwaruna2382 3 роки тому

    Why Microsoft File Forms do not include file upload under Add New?

    • @cvkealey
      @cvkealey  3 роки тому

      The file upload question type is only available for forms where you only allow people in your organization to submit it. It sounds like you have an anonymous/anyone form.

  • @michigandnr4161
    @michigandnr4161 2 роки тому

    We just want to add a link to the image in the custom list so all the information from the form is available right there, not move the files to a new location. Since it's a team group, everyone already has access to the files, no need to move them. Any tutorials on how to do that? Thanks.

    • @cvkealey
      @cvkealey  2 роки тому +1

      When you parse the JSON of the file upload question response, one of the values returned is the "link", which is the full URL of the file. You can add a hyperlink column to your list and populate it with that value. This should work fine if you limit the question to allow only one file upload. In that case, the data is still returned as an array (of just one item), so you'll need to use the "first" expression to get the first (which also happens to be only) link from the JSON. It'll be something like "first(outputs()?['link'])"

  • @chrisjpeltz
    @chrisjpeltz 3 роки тому

    Works great! How do I get a URL to the new file uploaded so that I could reference it in a future step where I went to send an email out with a link to that file? (not the actual file, but the link to it)

    • @cvkealey
      @cvkealey  3 роки тому

      You could use the "Path" output of the Create file action (assuming the recipient has permissions to it) or throw in a "Create sharing link" action with the appropriate scope (anyone or organization) and permission (view or edit) and use the "Link" output of that.

  • @heathervo9144
    @heathervo9144 2 роки тому

    How would we go about deleting the files after they're pushed into sharepoint? Especially if it's mutiple attachments in different folders.

    • @cvkealey
      @cvkealey  2 роки тому

      You'd need to add the appropriate "delete file" action (OneDrive for personal forms, SharePoint for group forms) after they're saved. Personally, if it were more than a couple of files, I'd probably put the relevant details (file identifier) into an array along the way and then run the delete file action in an apply to each loop iterating through that array.

    • @heathervo9144
      @heathervo9144 2 роки тому

      @@cvkealey thanks for the fast response. I'll try that. I'm currently watching the playlist that goes into detail. I'm on the step where I'm attaching the array to the attachment field, but I keep receiving the error either "To, Subject, Body" is empty or "unable to access body or attachment" or "$content-type missing :". Do you have any additional suggestions?

    • @cvkealey
      @cvkealey  2 роки тому

      @@heathervo9144 double-check what you're putting into the attachments array. You need to provide the name (with the extension) and the file content (output from the "get file content" action). In general, inspect the inputs/outputs from a failed run to see what data is actually being used.

    • @W3stSid3Vi3t
      @W3stSid3Vi3t 2 роки тому

      @@cvkealey currently have a variable to look at the completed outputted array and I don’t see any issues except for addslashes. I went in and looked at every time I iterated the array and the get content files and everything looks correct so far

    • @cvkealey
      @cvkealey  2 роки тому

      @@W3stSid3Vi3t Hrm...it's kind of tough to troubleshoot these issues here. I'd suggest posting a message in the Power Automate Community (powerusers.microsoft.com/t5/Forums/ct-p/FL_Comm_Forums) with some screenshots of your flow's configuration and the error messages. You can tag me there (@Chad_V_Kealey) and I'll take a look.

  • @redkulaT
    @redkulaT 3 роки тому

    Are you able to do one for an email trigger with the file link?

    • @cvkealey
      @cvkealey  3 роки тому

      You mean "When an email is received"? There are a few templates built around that trigger that save attachments to OneDrive or SharePoint. Check those out and I think you'll find what you're looking for. If not, give a bit more detail on what you want to achieve.

  • @studiotech6194
    @studiotech6194 2 роки тому

    What happened if the attachment is not included on the form i am getting error message from Parse JSON how can i stop it please. InvalidTemplate. Unable to process template language expressions in action 'Parse_JSON' inputs at line '0' and column '0': 'Required property 'content' expects a value but got null. Path ''.'. any help

    • @cvkealey
      @cvkealey  2 роки тому

      See ua-cam.com/video/jBTmX0cm6NU/v-deo.html for details on how to adjust your flow to accommodate non-required file upload questions.

  • @eddoria01
    @eddoria01 3 роки тому

    Have you a video on sending an email once a form response is received. I would like to show the attachments in the email so the user does not need to go to SPO.

    • @cvkealey
      @cvkealey  3 роки тому

      Not specifically on that, but since you need the file name and content to attach it to an email, it's very similar to this. Just replace the "create file" action with a "send email" action and plug in the attachment name and content. If you need to attach multiple files, you'll need to create an array variable and append each one to it, then you can attach the array in the email.

    • @cvkealey
      @cvkealey  3 роки тому

      Check this out: ua-cam.com/video/az23pHVLdSo/v-deo.html

  • @EzStory
    @EzStory 11 місяців тому

    Thanks for your sharing sir, but i have a problem "Action 'Get_file_metadata' failed"

    • @cvkealey
      @cvkealey  11 місяців тому

      It sounds like the identifier you're using isn't correct. Is the form a personal form or group form?

    • @cvkealey
      @cvkealey  11 місяців тому

      See this playlist for more info: ua-cam.com/play/PLMVyjgrWIGnwQowO2RsvHg0pZ8EozvAG-.html

    • @ezraroellstoa
      @ezraroellstoa 11 місяців тому

      Personal form​@@cvkealey

  • @sandysmajic786
    @sandysmajic786 3 роки тому

    Hi, how can I use this for multiple uploads, since I have multiple questions with upload in my form

    • @cvkealey
      @cvkealey  3 роки тому

      Short answer: repeat the steps (parse json, get file properties, get file content, etc.) for each question. If you put those steps inside of a scope, you can copy & paste the scope to save some clicks. Also, see my updated playlist on this topic: ua-cam.com/play/PLMVyjgrWIGnwQowO2RsvHg0pZ8EozvAG-.html for more details.

  • @xien82
    @xien82 3 роки тому

    I appreciate your knowledge sharing. by the way, how can I get the uploaded file's URL?

    • @cvkealey
      @cvkealey  3 роки тому

      When you parse the json of the file upload question response, it's in the 'path' property.

  • @juancillliers8786
    @juancillliers8786 2 роки тому

    Hello, Is this flow still valid or is there an update required. I keep getting a file not found 404 error under the create file. There seems to be a mismatch in the request ID's.

    • @cvkealey
      @cvkealey  2 роки тому +1

      The instructions in this video are still valid. It's important to note that while OneDrive and SharePoint both have some properties with the same name (like "ID"), they do not store the same information, or at least not in the same format. I have an updated playlist that goes into more detail and may be useful to you: Microsoft Forms, Uploaded Files and Power Automate: ua-cam.com/play/PLMVyjgrWIGnwQowO2RsvHg0pZ8EozvAG-.html

    • @juancillliers8786
      @juancillliers8786 2 роки тому

      @@cvkealey Managed to come right based off your videos. I had to create two "apply to each rules", the first one connected to "body" looping through "get file contents" and then "append to array variable". The second "apply to each" connected to the varFiles initialize variable to "create item".

  • @marinaaparicio3985
    @marinaaparicio3985 3 роки тому

    Hi since it appears the file is saved on an individual's one drive will this work when the form is used for several people in the organization to submit information on a form?

    • @cvkealey
      @cvkealey  3 роки тому

      When it's a personal form, the files are stored in the form owner's OneDrive. When it's a group form, they are stored in the Documents library in the group's SharePoint site. The steps shown in this video will work in either case (that is, even when they're stored in SharePoint, you need to use the OneDrive actions to "get" the file & its content before you can save it somewhere else).

    • @marinaaparicio3985
      @marinaaparicio3985 3 роки тому

      @@cvkealey Thank you! This was very helpful. Is there a way to have the file name show in a nicer format in the SharePoint List? It comes out with the entire path showing obviously which is extremely long and does not look very appealing.

    • @cvkealey
      @cvkealey  3 роки тому

      @@marinaaparicio3985 are you certain you're selecting the name and not the path when creating the file? Can post a message to the Power users community with some screenshots? You can tag me there (ChadVKealey)

    • @marinaaparicio3985
      @marinaaparicio3985 3 роки тому

      @@cvkealey This is what comes up in the online view of the list: [{"name":"Finance Engagement Team Job Board_Kellie Walton.docx","link":"​docx icon Finance Engagement Team Job Board_Kellie Walton.docx","id":"01X3JF3XPEO47GTBO3UBEISMAF3IRZAWZ6","type":null,"size":13901,"referenceId":"01X3JF3XKXU3557WTMVNEYMRGEV2LP55QL","driveId":"b!rfGzbH5800K0iKPesqKWsJPnGD7x4exFgMlLJRcsCXd1RzTVgbtiQYyAicxMl204","status":1,"uploadSessionUrl":null}]

    • @cvkealey
      @cvkealey  3 роки тому

      Sorry for not responding sooner. You need to run that through the Parse JSON step (starting at around 4:10 in the video) to extract the individual parts, including the name.

  • @nikhiljagtap4488
    @nikhiljagtap4488 3 роки тому

    I want to upload .xml file through MS Forms, is it possible? If not with forms, is there any other way to upload .XML using Microsoft tools?

    • @cvkealey
      @cvkealey  3 роки тому

      Xml is just a text file with special markup/structure. By default, forms does not limit the allowed file attachment type, so I would suspect this same process would work.

  • @indichick36
    @indichick36 3 роки тому

    Is there a way to rename the file?

    • @cvkealey
      @cvkealey  3 роки тому

      Yes. When you're creating the file, you can use whatever name you'd like. In this example (see ua-cam.com/video/amByVPsgUw8/v-deo.html), I'm using the 'name' of the uploaded file (extracted from the file upload response). But, it could be anything. However, if you're writing the file to a SharePoint library, remember that file names need to be unique. If a file of the same name already exists, it IS smart enough to just append a number to the end to make it unique (e.g.: if you attach a file named "document.docx", and a file with that name already exists in the library, the new file will be named "document 1.docx").
      In fact, in most of the processes where I'm using this, I am re-writing the file names to enforce a specific naming convention, usually based on data submitted in the form. For example, one department has their faculty use a form to upload the syllabus for their course. In the form, they select the subject code, then type in the course number and section number. In the flow, I use that information to build a name in the format "(subject-code)-(course-number)-(section-number)_Syllabus" AND populating columns in the library for those values as well.

    • @NoleeXC
      @NoleeXC 2 роки тому

      @@cvkealey is there a way to get rid of the name of the MS Form submitter? I see it auto added to the file name.

    • @cvkealey
      @cvkealey  2 роки тому +1

      @@NoleeXC Here you go:
      ua-cam.com/video/PRwUn0aZysM/v-deo.html

    • @NoleeXC
      @NoleeXC 2 роки тому

      @@cvkealey Thank you!!! This tutorial was exactly what I was looking for.

  • @totem9
    @totem9 9 місяців тому

    Can I rename the file

    • @cvkealey
      @cvkealey  9 місяців тому

      Yes. See ua-cam.com/video/PRwUn0aZysM/v-deo.html

  • @badboygaming1231
    @badboygaming1231 Рік тому

    I can’t believe you just gloss over the concat step and continue. It was going so well until then 😂

    • @cvkealey
      @cvkealey  Рік тому

      If you mean the . part, I think I explain that pretty clearly. I mean, I don't drill into why you need to use that sequence, but I wouldn't say I "gloss over" it. However, I know a number of people have commented that they had issues where they missed/forgot that . in between.

  • @mjw2185
    @mjw2185 4 дні тому

    I have a form with three separate upload prompts. How can I modify the flow so that attachments from ALL three prompts are sent in the same email? I tried the flow as it is and it only emails the file attachment from the first prompt. I know it makes more sense to just have the user upload all files in one spot, but I'm working with a form created by someone else.

    • @cvkealey
      @cvkealey  4 дні тому +1

      You need to repeat the parse json action for each question and append them all to the same array variable. See ua-cam.com/video/2mrcTMkwelE/v-deo.htmlsi=4d8Xk9W2wVqcr1Oj for more details.

    • @mjw2185
      @mjw2185 2 дні тому

      @@cvkealey Thanks for the response! I watched the additional video but I didn't see exactly where it applies to my scenario? You show how to save files from multiple upload questions to SharePoint, but I'm using "Send an email from a shared mailbox (V2)." I duplicated the ParseJSON step (So I have ParseJSON, ParseJSON 2, ParseJSON 3 - not sure if that's correct) and changed the "Content" field to the corresponding upload question, but I think I'm missing something. How to I "append them all to the same array variable?" As-is, I'm only receiving the file from the first upload question. Thanks again!

    • @cvkealey
      @cvkealey  2 дні тому

      @@mjw2185 You're creating an array variable to store the file data from a single question, correct? You're using an "Append to array variable" action to add that question's file data to the variable. Repeat that process with the file data from additional questions, appending them all to the same variable.
      Also, it's not likely you will find many tutorials that address the exact process you're trying to build. I base my demos on common scenarios and try to keep the focus on helping people understand the core concepts so they can apply them to their own specific use cases.

    • @mjw2185
      @mjw2185 2 дні тому

      @@cvkealey Thank you, I’m really a beginner at this so even the terminology you use is unfamiliar to me. The form I’m using was created by someone else and has three separate upload questions. I got the flow working using your tutorial to email the single file but don’t understand enough to figure out repeating the “append to array variable” step on my own. I might just tell the person I’m working with we’re stuck with one upload question only and just consolidate them. Thanks for your help!

    • @cvkealey
      @cvkealey  20 годин тому

      See this video: ua-cam.com/video/u02OPm78fBA/v-deo.html