How to Save a Single Microsoft Form Attachment to a SharePoint List Using Power Automate

When users submit Microsoft Forms with file attachments, those files land in OneDrive rather than directly in SharePoint. Power Automate must bridge this gap, but the process is not always straightforward. Many beginners run into loops that process every file in a form response instead of targeting just one specific attachment. This creates duplicate entries, bloated SharePoint lists, and data that is difficult to manage or audit later on.

The core issue is that Microsoft Forms stores each attachment reference as an array, even when the form allows only one file. Power Automate reads this as a collection and tries to iterate over it. Without the right configuration, the flow will either fail silently or create multiple SharePoint list items for a single form submission. Knowing why this happens is the first step toward fixing it permanently and building a reliable automation.

Setting Up Your Form

Before building any flow, the Microsoft Form itself must be configured properly to accept exactly one attachment per submission. Open Microsoft Forms and either create a new form or edit an existing one. Add a File Upload question by clicking the plus icon and selecting that question type from the available options. This question type allows respondents to attach documents, images, or other files directly within the form.

Once you add the File Upload question, look at the settings for that specific question. You will see an option that limits the number of files a respondent can upload. Set this to one file to ensure that only a single attachment is ever submitted per response. Also define the allowed file types and the maximum file size to prevent unexpected uploads that could cause your flow to fail downstream when it attempts to process them.

Connecting to Power Automate

With the form ready, navigate to Power Automate at make.powerautomate.com and sign in with the same Microsoft account that owns the form. Click the Create button on the left panel and choose Automated Cloud Flow from the list of flow types. This type of flow runs automatically whenever a trigger event occurs, which in this case will be a new form response. Name your flow something descriptive so it is easy to identify later.

In the trigger step, search for Microsoft Forms and select the trigger labeled When a new response is submitted. Click the dropdown under Form Id and find your form by name. If your form does not appear immediately, give it a few seconds and refresh the list. Once selected, Power Automate will monitor this form continuously and launch the flow every time someone submits a new response, including one with an attached file.

Fetching Response Details

The trigger alone only tells Power Automate that a response was submitted. It does not give you access to the actual answers or the attachment. To get those, you must add the Get response details action immediately after the trigger. Search for Microsoft Forms again and choose Get response details from the action list. Set the Form Id to match your form and set the Response Id field to the dynamic content value called Response Id that comes from the trigger step.

This action returns all the answers from the submitted form, including the file upload field. The attachment information comes back as a JSON string representing an array of file objects. Each object contains properties like the file name, the file size, and the link to where the file is stored in OneDrive. You will need to parse this string carefully in the next steps to extract just the single file you want to save to your SharePoint list.

Parsing the Attachment Data

The file upload answer from Microsoft Forms is not a ready-to-use file object. It is a raw JSON string that looks something like a bracket-enclosed array with one file entry inside. To work with this data in Power Automate, you need to parse it using the Parse JSON action. Add this action after Get response details and paste a sample JSON payload into the schema generator. Power Automate will build a schema that tells it what properties to expect.

To get the sample JSON, you can temporarily submit a test response to your form with an actual file attached. Then run the flow manually or check the run history after submission to see the raw output from Get response details. Copy the value from the file upload field and paste it into the Parse JSON schema generator. Click Generate from sample and Power Automate will create a schema with fields like name, link, and size automatically recognized and ready for use.

Isolating the First File

After parsing the JSON, the data is recognized as an array. Even though your form only accepts one file, Power Automate still sees a list. To avoid triggering a loop over that list, you should use the first() expression function to extract only the first element. In an expression field anywhere in your flow, type first() and inside the parentheses, reference the body output of your Parse JSON action. This gives you a single object representing the one attachment.

Using first() is preferable to applying an Apply to each loop when you know only one file exists. Loops add unnecessary complexity and can cause unintended behavior if a second file ever slips through. By pulling just the first item with an expression, you keep the flow lean, predictable, and easy to debug. Store this result in a Compose action so you can reference it cleanly in the steps that follow without repeating the expression each time.

Getting File Content

Now that you have the file object isolated, you need to retrieve the actual file content so it can be saved as an attachment in SharePoint. The link property in the file object points to the file stored in OneDrive. Use the Get file content using path action from the OneDrive for Business connector. In the File field, use the link value from your Compose output. This action downloads the binary content of the file into the flow.

It is important to note that the link from Microsoft Forms is a direct path inside OneDrive and not a public URL. Power Automate handles this internally when you use the OneDrive for Business connector with the correct credentials. If your form and your Power Automate account belong to the same Microsoft 365 tenant, this connection works seamlessly. Make sure the account running the flow has at least read access to the OneDrive folder where Microsoft Forms saves uploaded files.

Creating the SharePoint Item

Before attaching a file to a SharePoint list item, that list item must exist. Use the Create item action from the SharePoint connector. Select your SharePoint site from the Site Address dropdown and choose the correct list from the List Name dropdown. Fill in any required fields such as title or other custom columns that your list contains. For the title, you can use any dynamic content from the form response, like the respondent name or a submission timestamp.

Once this action runs, it creates a new row in your SharePoint list and returns an ID for that newly created item. This ID is critical because SharePoint attachments are linked to specific list items through their unique IDs. Without capturing this ID, you cannot attach a file to the correct row. Power Automate automatically makes the ID available as dynamic content after the Create item action runs, so you can reference it in the next step without any manual configuration.

Attaching File to List

With the SharePoint list item created and its ID captured, you can now attach the file. Use the Add attachment action from the SharePoint connector. In the Site Address and List Name fields, enter the same values you used for the Create item action. In the Id field, use the dynamic content ID from the Create item step to ensure the file attaches to the correct row.

For the File Name field, use the name property from your Compose output that contains the isolated file object. For the File Content field, use the body or file content output from the Get file content using path action you added earlier. When the flow runs, Power Automate will upload the file binary and link it to the SharePoint list item as a native attachment, exactly like a file you would manually attach through the SharePoint interface.

Handling File Name Errors

One common issue at the attachment step is a file name that contains special characters or spaces. SharePoint is generally tolerant of spaces in attachment names, but certain characters like percent signs, hash symbols, and angle brackets can cause the action to fail. To prevent this, add a Compose action after isolating the file name and use the replace() expression to strip or substitute any problematic characters before passing the name to the Add attachment action.

Another frequent problem is that the file name from Microsoft Forms sometimes includes URL encoding, where spaces appear as %20 and other characters are represented with percent codes. Use the decodeUriComponent() expression in Power Automate to convert these encoded strings back to human-readable file names. This small step prevents confusing file names from appearing in your SharePoint list and makes it easier for users browsing the list to identify their uploaded documents.

Testing Your Flow Run

After building all the steps, save the flow and submit a test response through your Microsoft Form with a real file attached. Watch the flow run in the Power Automate run history to confirm each action completes without errors. Click on each action in the run details to see the inputs and outputs and verify that the file content was retrieved, the SharePoint item was created, and the attachment was added successfully.

If the flow fails at any point, read the error message carefully. Most errors at this stage come from permission issues, incorrect field mappings, or malformed JSON schemas. Check that the account running the flow has contribute access to the SharePoint list and read access to OneDrive. Re-run the flow after fixing each issue rather than making multiple changes at once, which makes it easier to isolate the exact cause of any remaining errors.

Adding Error Handling

A production-ready flow should include error handling so that failures do not go unnoticed. In Power Automate, you can configure each action to run only on success, on failure, or both. After your main flow path is complete, add a parallel branch that runs only if the Add attachment action fails. In that branch, add a Send an email notification action to alert yourself or your team when something goes wrong, including the error details in the message body.

You can also use the scope action to group your main steps together and then catch errors from the entire group at once. This is cleaner than adding error handling after every individual action. Set the scope to run after the group has failed, and inside the scope, add your notification or logging step. Writing error details to a separate SharePoint list designed for logging is another approach that makes troubleshooting easier over time.

Managing Permissions Correctly

Permissions are one of the most overlooked aspects of Power Automate flows involving SharePoint and OneDrive. The account used in each connector must have appropriate access. For the Microsoft Forms connector, the account must own or be a co-owner of the form. For the OneDrive for Business connector, the account needs at least read access to the folder where forms attachments are saved, typically under Apps/Microsoft Forms in the account’s OneDrive.

For the SharePoint connector, the account needs contribute access or higher on the target list. If you are building this flow for an organization where multiple people will submit responses, consider using a service account with the right permissions across all three connectors. This prevents the flow from breaking if the original creator leaves the organization or their credentials are changed. Document these permissions in your team’s IT notes so they can be maintained over time.

Scheduling Maintenance Checks

Even well-built flows need occasional maintenance. Microsoft sometimes updates connector behaviors, changes how Forms stores attachments, or introduces new Power Automate features that affect existing flows. Set a reminder to review your flow every few months to ensure it is still running correctly. Check the run history for any increasing error rates and investigate spikes in failure counts before they become a persistent problem.

Also keep an eye on the OneDrive storage used by Microsoft Forms. Attachments submitted through forms accumulate in OneDrive and can consume significant space over time. If your organization has many form submissions, consider adding a step in the flow that deletes the file from OneDrive after it has been successfully saved to SharePoint. This keeps storage clean and avoids hitting quota limits that could prevent new submissions from being processed.

Scaling for Multiple Fields

Once your single-attachment flow is working reliably, you may want to extend it to handle forms with multiple file upload questions. The same first() approach works for each question independently. For each file upload field in the form, repeat the Parse JSON, Compose, Get file content, and Add attachment steps. Each file upload question has its own output in the Get response details action, so they can be processed in parallel or in sequence.

If you need to handle scenarios where users may or may not upload a file, add a Condition action before the attachment steps that checks whether the file upload field is empty. Use the empty() expression to evaluate the parsed JSON body and skip the attachment steps entirely when no file was submitted. This prevents the flow from failing when a file is optional and the user chooses not to upload one, making your automation more flexible and resilient across different submission patterns.

Reviewing Flow Performance

Power Automate provides analytics on flow performance that are worth reviewing regularly. In the flow detail page, you can see average run duration, success rates, and a breakdown of which actions take the longest to complete. For file attachment flows, the Get file content step is often the slowest because it depends on file size. If large files are causing timeouts, consider adding a file size check before attempting to download the content and notify the submitter if their file exceeds a reasonable limit.

You can also use the Power Platform admin center to review flow usage at an organizational level. If this flow is being shared across a team or department, the admin center shows who is running it, how often it runs, and whether it is consuming excessive API call quotas. Power Automate has daily limits on the number of actions that can run per user, so for high-volume scenarios, investigate premium licensing options that offer higher limits and better performance guarantees.

Conclusion

Building a Power Automate flow that saves a single Microsoft Form attachment to a SharePoint list is a highly practical skill that brings real efficiency to teams managing form submissions. The process covers several interconnected steps: setting up the form correctly, triggering the flow on each new response, fetching the response details, parsing the JSON attachment string, isolating the first file with the first() expression, retrieving the file content from OneDrive, creating a SharePoint list item, and attaching the file to that item using its unique ID.

Each of these steps depends on the previous one functioning correctly, which is why thorough testing and proper error handling are not optional extras but essential parts of a reliable flow. Special attention to permissions across Microsoft Forms, OneDrive, and SharePoint prevents the most common failure points that frustrate beginners and intermediate users alike.

Beyond just making it work, investing time in maintenance, scaling the flow for additional fields, and monitoring performance ensures that the automation remains valuable as your organization grows. A flow that breaks silently or fills up storage without warning creates more problems than doing the task manually, so building it right from the beginning is always worth the extra effort.

Whether you are processing job applications, collecting client documents, or gathering internal reports, this approach gives you a clean, scalable foundation. With the right structure in place, you can adapt the same pattern to many other form and SharePoint scenarios, extending the value of your initial investment well beyond a single automation project.