logo
search
Others

Fix Power Automate Flow Failed Due to Missing Form Attachment

WPS EditorWPS Editor Sep 28, 2026 870 views

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.

Fix Power Automate Flow Failed Due to Missing Form 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.
Before you start

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.

Solution 1Recommended

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.

1
Edit your flow

Log in to Power Automate, navigate to 'My flows', and open the failing workflow in Edit mode.

2
Insert a Condition action

Click the '+' icon right after the 'Get response details' action and select 'Condition' from the Control connectors.

3
Configure the empty check

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']).

4
Set the logic values

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).

5
Organize flow branches

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.

Add a Condition to Handle Empty File Upload Fields
Workflow Optimization: Using the empty() expression prevents the flow from throwing a null reference error, ensuring your automation runs successfully whether the user uploads a file or not.
Free Microsoft Office alternative

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. 1. Download the software: Visit the official WPS website and click on 'Download WPS Office Free'.
  2. 2. Install the suite: Run the downloaded installer and follow the simple on-screen instructions.
  3. 3. Open your files: Launch WPS Office and immediately open any documents generated by your automated Microsoft Forms flows.
Seamlessly view and edit documents, spreadsheets, and presentations generated by your automation flows.Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx) for zero formatting issues.Lightweight installation ensures fast performance without consuming heavy system resources.Familiar tabbed interface makes transitioning from Microsoft Office incredibly easy.
microsoft office alternative - wps office

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.