Fix Power Automate Flow Failed Due to Missing Form Attachment
Question details
The user needs a way to prevent a Power Automate workflow from failing when a respondent submits a Microsoft Form without uploading an optional attachment.

- Product
- Power Automate and Microsoft Forms
- Device & OS
- not provided
- Scenario
- Automating Microsoft Forms responses using Power Automate where the form includes an optional file upload question.
- Observed behavior
- The flow completes its initial intended steps but eventually registers a 'Failed' status because subsequent file-processing actions attempt to use an attachment that does not exist.
Ensure you have edit access to your Power Automate flow and verify the exact dynamic content name of the file upload field from your Microsoft Forms trigger.
Add a Condition to Handle Empty File Upload Fields
Use an expression condition to verify if the file upload field is empty before attempting to process the attachment.
By default, Power Automate expects data to be present when an action is configured to handle files. If the attachment is optional in Microsoft Forms, you must explicitly tell the flow what to do when the data is missing using a Condition action.
Log in to Power Automate, navigate to 'My flows', and open the failing workflow in Edit mode.
Click the '+' icon right after the 'Get response details' action and select 'Condition' from the Control connectors.
Click the first field of the condition, switch to the 'Expression' tab, and type empty(). Place your cursor inside the parentheses, switch back to 'Dynamic content', and select your file upload field. The expression should look like empty(outputs('Get_response_details')?['body/YourField']).
Set the middle operator dropdown to 'is equal to'. In the final value box, type the expression false. This means the condition checks if the attachment array being empty is false (i.e., a file exists).
Drag all your file-processing actions (such as 'Create file' in SharePoint or OneDrive) into the 'If yes' branch. Leave the 'If no' branch empty, or add a successful 'Terminate' action so the flow finishes smoothly without an attachment.

Manage Automated Documents Easily with WPS Office
While Power Automate and Microsoft Forms are great for data collection, you need a reliable office suite to view, edit, and manage the reports and documents generated by your automated workflows. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office.
- 1. Download the software: Visit the official WPS website and click on 'Download WPS Office Free'.
- 2. Install the suite: Run the downloaded installer and follow the simple on-screen instructions.
- 3. Open your files: Launch WPS Office and immediately open any documents generated by your automated Microsoft Forms flows.

Frequently Asked Questions
Why does my Power Automate flow fail only on certain Form submissions?
Flows typically fail intermittently if they are designed to process attachments but the file upload question in Microsoft Forms is marked as optional. When a user submits the form without a file, the flow fails to find the data it expects for subsequent file creation steps.
Can I prevent this error directly in Microsoft Forms?
Yes. If you make the file upload field mandatory by toggling the 'Required' switch in Microsoft Forms, users will not be able to submit the form without an attachment. This eliminates the need for empty checks in Power Automate, provided an attachment is strictly necessary.
What does the empty() expression do in Power Automate?
The empty() expression checks whether a specific field, array, or string has no value. It returns 'true' if there is no data (e.g., no file attached) and 'false' if data is present. This is essential for safely routing workflow logic without triggering null errors.




