Microsoft Forms Attachments in Email with Power Automate
Microsoft Forms lets people upload files, but the notification email only gives you a link, and the files sit in the form owner's OneDrive. If the office needs the actual photos, invoices or CVs in an inbox, a short Power Automate flow can attach every uploaded file to one email. Here is the exact flow I build.
1. Know where Forms keeps the uploaded files
A file upload question only works when the form is set to "Only people in my organization can respond", because Forms needs to know who is uploading.
For a personal form, the files go to the form owner's OneDrive, in Apps > Microsoft Forms > (form name) > (question). For a form owned by a Microsoft 365 group, they go to the group's SharePoint document library. That decides which "Get file content" action you use later.
2. Start the flow from the form
- Create an automated cloud flow with the trigger When a new response is submitted and pick your form.
- Add Get response details, same form, Response Id from the trigger.
Submit a test response with two files now, so the next steps have real data.
3. Read the file upload answer as JSON
The upload question does not return files. It returns text describing them: one entry per file, with name, link and id. Add Parse JSON, put the upload answer in Content, and use this schema:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"link": { "type": "string" },
"id": { "type": "string" },
"size": { "type": "integer" }
}
}
}
4. Create an attachments array
Before the loop, add Initialize variable: Name attachments, Type Array, empty value. It must sit at the top level of the flow.
5. Get each file and add it to the array
Add Apply to each over the Body of Parse JSON. Inside it:
- OneDrive for Business Get file content, File = the
idfrom Parse JSON. (Group form: SharePoint Get file content using path.) - Append to array variable on
attachments:
{
"Name": "@{items('Apply_to_each')?['name']}",
"ContentBytes": @{body('Get_file_content')}
}
6. Send one email with every file attached
After the loop, add Send an email (V2). In Advanced parameters, switch Attachments to array input and drop in the attachments variable. Add the responder's answers to the body so the email stands on its own.
Tip: large uploads can exceed the receiving mailbox's size limit. For big files, send the links instead.
7. Handle responses with no files
If the upload is optional, an empty answer makes Parse JSON fail. Use a fallback so empty becomes an empty list:
if(empty(outputs('Get_response_details')?['body/r1234']), json('[]'), json(outputs('Get_response_details')?['body/r1234']))
Replace r1234 with your question's id (visible in the raw outputs). With no files the loop runs zero times and the email still goes out.
There's a 100-second video walkthrough of this flow and the full guide with FAQs here: Microsoft Forms attachments in email with Power Automate.
Daniel Awokunle, Microsoft 365 consultant at Winstack365.
About the author
- Daniel Awokunle is a Microsoft 365 consultant and the founder of Winstack365. 500+ projects across SharePoint Online intranets, Power Apps, Power Automate, Teams, Exchange and Copilot readiness for small and mid-sized firms. Top Rated on Upwork with 100% job success. Free plain-English guides at https://winstack365.com/guides
Comments
Join the discussionNo comments yet. Be the first to comment.
