How to Create a Power Automate Condition for Microsoft Forms Attachments
Question details
The user needs to configure a Power Automate flow to send specific emails depending on whether a Microsoft Forms submission contains an attachment.
- Product
- Microsoft Power Automate
- Device & OS
- not provided
- Scenario
- Automating conditional email responses based on Microsoft Forms submissions.
- Observed behavior
- A conditional flow is required to branch into two actions: attaching the file to an email if present, or sending a different email if no attachment is uploaded.
Ensure you have an active Microsoft Power Automate account and a pre-configured Microsoft Form that includes a file upload question.
Configure Conditional Branching in Power Automate
Set up a condition to verify the presence of attachment data in the form response, then define the corresponding Yes/No email actions.
To route emails correctly based on file uploads, you must check the attachment array returned by Microsoft Forms. If the array contains data, the flow routes to the 'Yes' branch to fetch and send the file. Otherwise, it triggers the 'No' branch.
Add the 'When a new response is submitted' trigger for your specific form, followed by the 'Get response details' action using the Response ID.
Insert a 'Condition' action to check the attachment field. Configure it to test whether the attachment array is not empty (e.g., checking if the attachment field is equal to null or evaluating its length).
In the Yes branch, add a 'Get file content' action. Since Microsoft Forms saves attachments to OneDrive or SharePoint, use the file identifier from the parsed JSON attachment data. Then, add the 'Send an email (V2)' action and map the retrieved file content to the Attachments field.
In the No branch, add a 'Send an email (V2)' action and construct your alternative message that notifies the recipient that no attachment was provided.
Boost Your Productivity with WPS Office
While Power Automate manages Microsoft-specific cloud workflows, handling the downloaded exported form data, spreadsheets, and local reports is seamless with WPS Office. WPS Office is a highly compatible, free suite for viewing and editing Office documents.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the on-screen instructions to install the lightweight suite.
- 3. Open Your Data: Launch WPS Spreadsheet to seamlessly open and analyze your exported Microsoft Forms data without format loss.

Frequently Asked Questions
Where are Microsoft Forms attachments stored?
Attachments uploaded by internal users to a personal form are stored in the creator's OneDrive for Business. If the form is a Group form, the attachments are stored in the default SharePoint document library of that group.
Why does my Power Automate flow fail to get the file content?
The flow might fail if the attachment array is passed as a string. You often need to use the 'Parse JSON' action on the attachment field to properly extract the file ID and drive details before using the 'Get file content' action.
Can I send multiple attachments from Microsoft Forms in one email?
Yes. You can create an Array variable before the condition, use an 'Apply to each' loop to append the file content and name of each uploaded file to the array, and then pass that array into the attachments field of the 'Send an email' action.
How do I check if an array is empty in Power Automate?
You can use the expression empty() in the condition builder. For example, empty(outputs('Get_response_details')?['body/YourAttachmentField']) equals true.




