logo
Documents & Forms
Microsoft 365 & SharePoint Tools
Classic SharePoint Tools
Forms
Jul 25

Save Microsoft Forms attachments to SharePoint with Power Automate

Customer Support Engineer

If you've ever used Microsoft Forms for file collection, you know managing all those uploaded files can be cumbersome. For those who, like me, value well-organized data with responses and files stored together, there's a solution!

This article will guide you on how to save Microsoft Forms attachments to a SharePoint list using a Power Automate flow.

In this article:

Create a form in Microsoft Forms

Create a form with an Upload file question. Note that the form only allows file uploads from people within your organization.

Tip: If you want to allow external users to upload files to the form, consider using Plumsail public web forms.

For this example, I create a simple Expense Report form with three fields:

  • Employee name
  • Department
  • Please upload invoice/receipt

form preview

Create SharePoint list

Create a new SharePoint list to store responses from Microsoft Forms. For my form, I create a list with 2 columns:

  • Employee name - Single line of text
  • Department - Choice; Ensure the choices match those in the form.

You don’t have to create an Attachment column as a SharePoint list comes with an Attachment column.

lsit preview

Create an automated flow in Power Automate

Open Microsoft Power Automate and create an automated cloud flow. An automated cloud flow is triggered by a specific event.

Give your flow a name, then find the Microsoft Forms - When a new response is submitted trigger and click Create:

flow-set-up

These are the steps we will set up to save responses, along with attached files, to the SharePoint list:

flow-steps

1. When a new response is submitted

Select a form from the dropdown:

trigger

2. Get response details

To get the response details, you need to add a Microsoft Forms - Get response details action:

  • In the Form Id, select the form that you've selected in the flow trigger earlier.
  • In the Response Id, select the unique identifier of the response from the Dynamic content list:

Get response details set up

3. Create item

Add the SharePoint - Create item action, which will create a new item in the designated SharePoint list.

Specify the site address and select the SharePoint list. Then, fill in the fields that match the questions of the Microsoft form:

create-item-set-up

The files will be attached to the SharePoint item in the next steps.

4. Parse JSON

The files themselves are not attached to the response. They are stored in the OneDrive folder.

The file information, including the URL, is stored in JSON format. To read this data, add the Data Operations - Parse JSON action.

In the Content, select the Upload File question. In the Schema, add this schema:

    {
    "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"
        ]
    }
    }

Parse JSON

Alternatively, use the Generate from sample to create a JSON schema:

5. Get file content

Add the OneDrive for Business - Get file content action. In the File, select the Body id—the output of the Parse JSON step.

get-file

Once you do that, the step will be placed inside the Apply to each action to run through each attachment

6. Add attachemnt

The final step is to add attachments to the newly created SharePoint list item. Add the SharePoint - Add attachments action inside the Apply to each step.

Specify site and list name as you did for the Create item step. Set up the action with the data from the Dynamic content list as follows:

  • Id: Create item - body/ID
  • File Name: Parse JSON - Body name
  • File Content: Get file content - File content.

attachemnt

Finally, you're all done! Save the flow and test the process of saving responses together with attached files to the SharePoint list.

Frequently asked questions

How can I handle multiple attachments within a single response from Microsoft Forms?

You can allow users to upload up to 10 files to the Upload file question. To save multiple attachments to SharePoint or send them by email, you need to create an automated flow in Power Automate.

Can I save Microsoft Forms attachments to a specific SharePoint list?

Yes, you can save Microsoft Forms attachments to a dedicated SharePoint library or attach them to a SharePoint list item using a Power Automate flow. You'll need to add a Parse JSON action to the flow to extract the file details for saving.

Can I collect files from external users with Microsoft Forms?

No, the File upload question is only available for users within your organization. If you need to collect files from external users, consider using Plumsail Forms.

Better alternative to Microsoft Forms for file uploads

If you're looking for a simpler way to collect files, especially from external users or need to upload more than 10 files at once and save them in a specific location, look no further!

MS Forms would not let me handle attachments from users outside my organization, and did not have the variety of control tools that Plumsail has.
capterra.com review

Plumsail Forms allows you to effortlessly collect files and save them to any location. No need for complex JSON parsing or complicated setup. Simply use the dedicated action to download files and save them to SharePoint lists or libraries, OneDrive, Google Drive, or send them as email attachments.

This is my flow that creates SharePoint item and attach files to it once the Plusmail Forms response is submitted:

plumsail-flow

Neat and simple!

I also suggest you watch the amazing video by Enea Liçaj demonstrating Plumsail Forms features and providing instructions on creating an automated Microsoft Flow for saving user responses with attached files to a SharePoint list:

 

Additionally, see the instructions in the Create items and upload documents to SharePoint from Plumsail Forms article. It includes links to a Flow template, so you don't have to start from scratch.

Create a free Plumsail account and design your first form today to collect files and save them to SharePoint with ease!