logo
Forms
Last updated: Sep 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. To collect more than 10 files, consider using Plumsail Forms as an alternative to Microsoft Forms.

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 anonymous users, consider using Plumsail Forms.

Better alternative to Microsoft Forms for file uploads

If you're looking for a workaround for Microsoft Forms file upload limitations—such as needing to allow more than 10 files at once, accepting uploads from external users, and saving them to SharePoint—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 has a direct integration with SharePoint—no flows, complicated setups, or JSON parsing required. Simply create a connection with your SharePoint tenant and select the list where you want to save responses and uploads.

Plumsail Forms connection with SharePoint

Once connected, you'll see all your SharePoint fields in the left pane. Drag and drop them onto your form:

Plumsail Forms

Then, just save and share the form link. When users submit the form, all responses and uploaded files will be saved to the SharePoint list automatically.

Neat and simple!

And if you want to save files to OneDrive, Google Drive, or send them by email, use Power Automate and Plumsail Forms connector. Plumsail has a dedicated action to download files, so you don't have to deal with JSON parsing.

This is my flow that saves files to OneDrive:

Flow to save attached files to OneDrive

Much simpler than the Microsoft Forms flow, right?

See more details of Plumsail actions available in Power Automate in Handle form data in Power Automate article.

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