Data mismatch during processing – The data format or structure didn’t match expectations during processing

Loading

Power Automate is a powerful tool for automating workflows and processing data from multiple sources like SharePoint, Excel, SQL databases, APIs, and third-party services. However, one common error users face is “Data Mismatch During Processing,” which occurs when the data format or structure does not match what Power Automate expects.

This guide explains:
What causes data mismatches
How to diagnose the issue
Solutions for fixing and preventing data mismatches


Step 1: Understanding Common Causes of Data Mismatches

CauseDescription
Incorrect Data TypeThe flow expects a number but receives text, or vice versa.
Null or Missing ValuesThe expected value is missing (null) or empty.
Incorrect JSON FormattingThe JSON structure does not match the schema required by the action.
API Response ChangesThe API returns unexpected data due to version updates or structural changes.
Date Format IssuesDifferent date formats between data sources (e.g., MM/DD/YYYY vs. YYYY-MM-DD).
Excel Column Type MismatchAn Excel column is formatted as text, but the flow expects a number or date.
SharePoint Column Data Type IssueA column in SharePoint is expecting a specific data type, but the flow sends a different one.
Power Automate Expression ErrorsInvalid data manipulation using concat(), int(), float(), formatDateTime(), etc.
List/Array Structure MismatchThe flow expects an array but receives a single value, or vice versa.

Step 2: Diagnosing the Issue

2.1. Check the Flow Run History

  1. Open Power Automate (https://make.powerautomate.com).
  2. Click on My Flows → Select the affected flow.
  3. Go to Run History → Open a failed run.
  4. Look for the action that failed.
  5. Expand the error details and check:
    • Expected data type vs. actual data type.
    • Whether the input was null or empty.
    • If the JSON structure is incorrect.

Step 3: Fixing the “Data Mismatch During Processing” Error

3.1. Fix Incorrect Data Types

Problem: The flow expects a number, but a text value is provided.

Solution: Convert data types using expressions:

  • Convert text to number: int(variables('inputValue'))
  • Convert text to float: float(variables('inputValue'))
  • Convert number to text: string(variables('inputValue'))
  • Convert boolean to text: if(variables('inputValue'), 'true', 'false')

3.2. Handle Null or Missing Values

Problem: A required field is missing (null).

Solution: Use coalesce() to provide a default value:

coalesce(triggerOutputs()?['body/fieldName'], 'Default Value')

Alternative: Use “Condition” action to check if the value is empty before processing it.


3.3. Fix Incorrect JSON Formatting

Problem: The flow is receiving an incorrectly formatted JSON payload.

Solution:

  • Validate JSON input using “Parse JSON” action.
  • Use “Compose” action to inspect raw JSON output before processing it.
  • If needed, manually define the JSON schema in the “Parse JSON” action.

3.4. Handle API Response Changes

Problem: An API update changed the data structure, causing a mismatch.

Solution:

  • Check API documentation to confirm if the response structure has changed.
  • Modify the flow to match the new structure.
  • Use “Parse JSON” to extract required fields safely.

3.5. Fix Date Format Issues

Problem: The flow expects YYYY-MM-DD, but the input is MM/DD/YYYY.

Solution: Convert dates using formatDateTime():

  • Convert to standard format: formatDateTime(variables('dateValue'), 'yyyy-MM-dd')
  • Convert to a readable format: formatDateTime(variables('dateValue'), 'MMMM dd, yyyy')

3.6. Fix Excel Column Type Mismatches

Problem: The flow expects a number, but the Excel column is formatted as text.

Solution:

  1. Open the Excel file.
  2. Select the column → Change format to Number or Date.
  3. Save and re-run the flow.

3.7. Fix SharePoint Column Data Type Issues

Problem: A SharePoint column expects a number, but the flow sends text.

Solution:

  1. Open SharePoint → Go to List Settings.
  2. Check the column type (e.g., Single line of text, Number, DateTime).
  3. Ensure the flow is sending the correct data type.

3.8. Fix Power Automate Expression Errors

Problem: The flow uses an incorrect expression.

Solution: Check expressions for proper syntax. Examples:

  • Incorrect: concat('Hello' + 123) // Error: Mixing text and number
  • Correct: concat('Hello ', string(123))

3.9. Fix List/Array Structure Mismatches

Problem: The flow expects an array but receives a single value.

Solution: Convert single values into arrays using createArray():

createArray(variables('singleValue'))

Step 4: Preventing Future Data Mismatches

4.1. Best Practices

Use “Initialize Variable” actions to define expected data types.
Use “Parse JSON” to validate data structure before processing.
Check data types in SharePoint, Excel, and APIs before creating flows.
Use error handling to catch and handle mismatched data gracefully.


Step 5: Setting Up Error Alerts for Data Mismatch Issues

  1. Open Power Automate → Select your flow.
  2. Add a “Send an Email” action when a data mismatch occurs.
  3. Configure it to notify users about data issues.

Leave a Reply

Your email address will not be published. Required fields are marked *