This error means a module in your Make scenario received data from an external app that does not match the expected structure. The API returned unexpected fields, missing fields, wrong data types, or HTML instead of JSON. Check the module's output in the execution log, verify the API response format, and add data validation before processing.
What does "Scenario failed: module returned invalid data" mean?
When Make shows "Scenario failed: module returned invalid data," a module received output from an external API that does not conform to the expected data structure. Make modules have defined input and output schemas, and when the actual data deviates from the schema — missing fields, wrong types, or completely different formats — Make cannot process it and the scenario fails.
This is classified as a DataError in Make's error taxonomy. The most common occurrence is the "Unexpected token '<'" variant, meaning an API returned an HTML page (login redirect, error page, maintenance page) instead of JSON. This happens across virtually every tool that calls external APIs and is one of the most universal error patterns in automation.
The error can also indicate that the API changed its response format. APIs evolve over time, and when an endpoint adds, removes, or renames fields, the Make module's expected output structure becomes outdated. Some modules auto-update their schemas, but others require manual reconfiguration after API changes.
Common causes
The external API returned HTML instead of JSON
typically a login page, error page, or maintenance notice
The API changed its response
format after the module was configured, adding or removing fields
Authentication failed silently and the
API returned an auth error response instead of the expected data
The API rate limit was
hit and the response is a rate limit message instead of the expected data
A field expected to be
a string contains a number (or vice versa), failing type validation
The API returned an empty response or
null instead of the expected JSON object
How to fix invalid data errors in Make scenarios
Open the scenario execution log and click the failed module to see the raw data it received. If you see HTML tags (<!DOCTYPE html>), the API returned an error page — check authentication, the API URL, and the service's status page. If the data structure changed, re-configure the module by clicking 'Redetermine data structure' to fetch the latest API response format.
For intermittent issues where the API sometimes returns valid data and sometimes does not, add an error handler with the Ignore or Resume directive so the scenario skips bad responses and continues processing. Use a Router module to check the response format before processing — add a filter that verifies the expected fields exist. For complex API integrations that frequently return unexpected data, RapidDev can help build robust validation and transformation layers.
Prevention tips
- Check the failed module's raw output in the execution log to see exactly what data was returned
- Click 'Redetermine data structure' on the module after API changes to update its expected schema
- Add a filter after API modules to verify the response contains expected fields before processing
- Use the Resume error handler directive to provide default data when a module returns invalid output
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
My Make scenario shows 'module returned invalid data' because the API sometimes returns HTML instead of JSON. How do I add validation and error handling?
Add a filter module after my HTTP request that checks if the response is valid JSON and skips the iteration if it is HTML.
Frequently asked questions
Why does "Scenario failed: module returned invalid data" happen intermittently?
The external API may return different responses under different conditions — valid JSON normally, but an HTML error page during outages, rate limiting, or maintenance. Add error handlers to skip invalid responses.
How do I see the raw data that caused the module to fail?
Open the scenario execution history, click the failed run, then click the failed module. The Input/Output section shows the exact data received. Look for HTML tags, missing fields, or unexpected formats.
What does 'Redetermine data structure' do in Make?
It sends a new request to the API and uses the response to update the module's expected data schema. Use this after an API update to teach the module the new response format.
Can I provide default data when a module returns invalid data?
Yes. Use the Resume error handler directive to specify substitute output values. The scenario continues as if the module returned the default data instead of the invalid response.
Does the invalid data error consume Make operations?
The failed module and all subsequent modules do not consume operations. Modules that ran before the failure are counted. The error itself does not consume additional operations.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your issue.
Book a free consultation