Site icon @WonderLaura – Laura Rogers

Microsoft Form Attachments: Organize Files with Power Automate

Microsoft Forms create flow to send attachments and metadata to SharePoint

Have you found that handling attachments in Microsoft Forms with a Power Automate flow is a bit tricky? If you’ve ever been frustrated with where those attachments end up (spoiler alert: they don’t go where you want them), this one’s for you. I’ll show you how to get those Microsoft Form attachments and be specific about where they end up. I’ve written this post, and the associated demonstration video is at the bottom.

The Attachment Challenge

When someone submits Microsoft Form attachments, those files don’t just magically organize themselves. If you create a personal form, attachments go straight to your OneDrive. If you create a group form, they land in a generic SharePoint document library with a folder structure that looks like it was named by a robot having a bad day.

But here’s what we really want: when someone submits a project request form, we want those attachments organized in a proper folder with the project name, maybe with some metadata attached, and definitely not buried in some random system-generated folder path.

Group Forms Are Your Friend

Before we dive into the flow magic, let’s talk setup. This is crucial – you cannot use anonymous forms if you want attachments. People need to authenticate to your tenant to attach files in a Microsoft Form.

More importantly, don’t create a personal form for this. Instead, scroll down in Microsoft Forms and create a group form. Pick the Microsoft 365 group or SharePoint site where you want the files to initially land. This ensures everything starts in SharePoint rather than someone’s personal OneDrive. Create the group form ahead of time.

Building the Power Automate Solution to Get Microsoft Form Attachments

Here’s where things get interesting. The does four main things:

  1. Captures the form submission and gets all the details
  2. Creates a properly named folder for the project
  3. Moves each attachment to the new folder with metadata
  4. Cleans up the files from the original location

The Step by Step Flow

You can also see the demo of me building this whole thing, in the video below.

1. Start the flow with the Microsoft Forms trigger called When a new response is submitted.

Finding Your Form: Power Automate’s form picker in the trigger and action only shows personal forms, not group forms. So you’ll need to grab the form ID from the URL (everything after “&ID=”) and paste it into a custom value field. Yeah, it’s annoying, but it works.

2. Initialize Variables: Start with an array for the files and a string for the folder name. Always initialize variables at the top of your flow.

3. Getting the Response Details: The trigger alone doesn’t give you all the form data. You need a separate “Get response details” action to access the actual answers and Microsoft form attachments. Again, you’ll have to choose custom and paste that long GUID from step 1.

4. Set the Array: Use json() function with the project files question dynamic output. It’s weird, it’s ugly, but it works. You can jump to 21:01 in the video below, to see how I did this.

5. Set Your Folder Name Variable: This is where you get creative with naming conventions. I like to combine the project name with today’s date to ensure uniqueness. Nobody wants files accidentally mixed into the wrong project folder. You can jump to 22:18 in the video to see me demonstrate this.

6. Create the folder that the attachments will go in – use the SharePoint action called Create new folder. In my example, I created a library called “Project Submissions” for these files to live in.

Loop Through Attachments

7. Loop Through Each Attachment: Use “Apply to each” to process every file. Everything else in the rest of the flow is going to be inside of this loop. Notice that I renamed this action Apply to each attachment.

For each file, in the next set of steps you’ll:

8. Get file content using path – You’ll need to use the expression items('Apply_to_each_attachment')?['name'] to get file names. Yes, it’s cryptic. I cover this at 26:15.

9. SharePoint Create File – Add the create file action next. The folder name variable goes after your library path, and make sure you still have that / slash between the library name and the variable. Again, you’ll have to use that expression for the file name: items('Apply_to_each_attachment')?['name'] The file content is the dynamic content from the previous action. I cover this at 28:39

10. Update File Properties – add the SharePoint Update file properties action, and for the ID, refer to the dynamic content of the file you just created with the Create file action.

This is one of my favorite parts – you can automatically populate SharePoint columns with information from the form. Project date, project manager, budget, whatever fields you created on your form can become metadata on your files. No more hunting through form responses to find context for attachments. As you can see in the screenshot above, the project date field is using data that was submitted in the MS form. When you show all advanced parameters, you’ll see all of the columns in your library, which you can now populate.

Cleanup Those Original Files

11. Get the original file – Next, you’ll most likely want to clean up the file(s) in the original location, and since the ID is not known, but we do know the file name, use the SharePoint action called Get files (properties only). I cover this at 31:43

12. Delete that original file or files. It’s going to create a loop when you add this action and reference the ID from the get files action, which is fine.

The Messy Parts

File Names and Paths: You’ll need to use expressions like items('Apply_to_each_attachment')?['name'] to reference file names in several places in this flow. Yes, it’s cryptic.

Deleting Original Files: Since you only have file names (not IDs), you’ll need to use “Get files” with a filter query to find the original file before deleting it. The filter uses FileLeafRef eq 'filename' – another one of SharePoint’s charming system names.

Multiple Attachment Questions: If your form has several file upload questions (not multiple attachments on one question, but separate actual questions), you’ll need separate array variables and processing loops for each one. Or you could dump everything into the same project folder – your choice based on how organized you want to be.

Real-World Applications to Organizing Microsoft Form Attachments

This pattern works brilliantly for:

Project Intake Forms: New project requests with supporting documents automatically organized by project name.

HR Onboarding: Employee documents sorted into individual folders with metadata for easy searching.

Customer Support: Issue submissions with attachments organized by case number or customer.

Training Submissions: Student work organized by assignment or student name with automatic date stamping.

The Power of Proper Organization of Microsoft Form Attachments

What I love about this approach is that it transforms a basic form submission into a complete document management solution. Instead of hunting through system-generated folders, you get a clean, logical structure that actually makes sense to humans.

Plus, by adding metadata from the form responses, you’re creating searchable, filterable document libraries. Your future self (and your colleagues) will thank you when they need to find that one project document from six months ago.

Tips for Success

Test with Small Files First: Large attachments can cause timeouts while you’re building and testing your flow.

Plan Your Naming Convention: Think about what makes sense for your organization. Project names might not be unique, so consider adding dates, numbers, or other identifiers.

Consider Document Sets: If you watched our Power Hour on document sets, you could create those instead of folders for even more organized project files.

Create a SharePoint list item with attachments: There are a lot of benefits to having files in a library, but another option would be to have the flow create a SharePoint list item with all of the form metadata being added to the columns, and then use the SharePoint Add attachments action to add all of those uploaded files as attachments to a list item.

Don’t Skip the Cleanup: Deleting the original files keeps your SharePoint sites from becoming digital junk drawers.

Looking Ahead

While we still can’t have anonymous forms with attachments, this flow gives us a way to create professional, organized document collection processes. It’s more setup than we’d like, but the end result is worth it.

The beauty is that once you build this flow template, you can adapt it for different forms and scenarios. Change the folder naming convention, adjust the metadata fields, point to different libraries – the core pattern stays the same.

So there you have it – Microsoft Form attachments that actually end up where they belong, with the metadata they need, organized the way humans think. It’s not the simplest flow you’ll ever build, but it solves a real problem that a lot of us face.

Would you like to learn Power Automate? Check out my very own online 10 hour comprehensive course!

Remember, we do these Power Hour sessions every Wednesday at 11 AM Central. Happy form building and may your attachments always land in the right folders!

Here is the associated video:


Laura Rogers is a SharePoint expert and trainer. Connect with IW Mentor at iwmentor.com for more Microsoft 365 training and resources.

Here is a screenshot of the entire flow:

Exit mobile version