logo
search
Others

Fix Power Automate Errors for Optional Microsoft Forms File Uploads

Adam DavisAdam Davis Sep 28, 2026 869 views

Question details

Users need a solution to prevent Power Automate flows from failing when parsing optional file uploads from Microsoft Forms.

Fix Power Automate Errors for Optional Microsoft Forms File Uploads
Product
Power Automate / Microsoft Forms
Device & OS
not provided
Scenario
A flow is configured to process Microsoft Forms responses, but fails when a respondent skips an optional file upload question.
Observed behavior
The flow fails at the Parse JSON action because the empty optional file upload field returns a null value instead of the expected file content array, causing a schema validation error.
Before you start

Ensure you have edit access to the failing Power Automate flow and identify the specific Parse JSON step that is throwing the null value error.

Solution 1Recommended

Add a Condition Check Before Parse JSON

Use a condition block to verify if the file upload field contains data before attempting to parse it, preventing the flow from encountering null value errors.

The most robust way to handle optional file uploads is to branch your flow. By checking if the field is empty first, you can direct the flow to skip the Parse JSON action entirely when no file is uploaded, allowing the rest of your automation to continue without failure.

1
Insert a Condition action

Open your flow in Edit mode. Hover over the plus icon (+) directly above your Parse JSON step and select 'Add an action'. Search for and select the 'Condition' control.

2
Configure the empty() expression

Click inside the left value box of the Condition, navigate to the Expression tab, and type 'empty()'. Inside the parentheses, insert the dynamic content corresponding to your Microsoft Forms file upload field.

3
Set the logical operator

Change the middle dropdown operator to 'is equal to'. In the right value box, type 'true' (as a boolean expression, not just plain text). This condition now checks if the upload field is blank.

4
Rearrange the flow logic

Drag and drop your existing Parse JSON action (and any subsequent file-handling steps, like Create File) into the 'If no' branch. Leave the 'If yes' branch empty or add alternative actions for when no file is provided.

Add a Condition Check Before Parse JSON
Test Your Flow: After saving these changes, submit a new test response to your Microsoft Form without attaching a file to confirm the flow succeeds.
Free Microsoft Office alternative

Analyze Form Data Effectively with WPS Office

While managing complex automations requires careful error handling, reviewing the data collected from your forms should be simple. WPS Office is a free, lightweight, and highly compatible alternative to Microsoft Office that allows you to seamlessly open, filter, and analyze form-exported Excel files without any technical hurdles.

  1. 1. Export Responses: Download your collected form responses as an Excel (.xlsx) file.
  2. 2. Open in WPS Spreadsheet: Launch WPS Office and open your downloaded responses to view the data.
  3. 3. Filter and Analyze: Use the built-in Data tab in WPS Spreadsheet to easily filter out empty responses and organize your data.
Completely free and lightweight Office suite100% compatibility with Microsoft Excel (.xlsx) files exported from formsBuilt-in advanced data filtering and pivot table toolsFamiliar tabbed user interface for seamless migration
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Parse JSON action fail when a file is not uploaded?

When configuring a Parse JSON action using a sample payload of an uploaded file, the schema is strictly defined to expect an array of objects. When a respondent skips the upload, the form passes a 'null' value instead. Because 'null' is not an 'array', the schema validation fails.

How do I find the correct dynamic content for my empty() expression?

In the flow editor, click inside the expression editor. Switch to the Dynamic Content tab and search for the name of your file upload question from the 'Get response details' step. Selecting it will automatically populate the correct trigger output code into your expression.

Do I need separate condition checks if my form has multiple optional file uploads?

Yes. If you have multiple optional file upload fields, you should evaluate each one separately. You can use parallel branches with individual Condition blocks, or use advanced 'or()' expressions to handle the routing if the file handling logic is identical.

What happens to 'Create File' actions if I just modify the Parse JSON schema?

If you modify the Parse JSON schema to accept nulls but leave a 'Create File' action relying on that output, the 'Create File' step will fail because it cannot create a file from a null value. This is why using a Condition block to isolate file creation steps is generally the recommended approach.