Fix Make.com (Integromat) JSON Errors in Your Scenarios
Make.com failing to parse JSON? Learn how to handle malformed JSON, use the JSON module correctly, and fix common automation errors.
Have broken JSON right now? Fix it free in under 1 second — no signup.
Fix My JSON →Make.com (formerly Integromat) is a powerful visual automation platform — but when JSON breaks inside a scenario, the error messages can be cryptic and the debugging experience unforgiving. A single malformed character in a JSON payload stops the entire execution, marks it as an error, and often requires you to reprocess the bundle manually.
This guide covers every common Make.com JSON error, explains why each one happens, and gives you the exact fix for each.
How Make.com Parses JSON
Make.com handles JSON on two levels:
Automatic Parsing (HTTP Module)
When you use the HTTP > Make a Request module and the response has Content-Type: application/json, Make.com automatically parses the body. You can map nested fields directly: {{data.user.name}}, {{data.items[].id}}, etc.
JSON Module (Explicit Parsing)
When JSON arrives as a raw string inside a field — from a webhook, a text field, an AI module output — you need the JSON > Parse JSON module. You feed it the string and it produces a structured output you can map in subsequent modules.
The JSON module is strict: it uses the browser's native JSON.parse() under the hood. Any deviation from the JSON specification causes an immediate error.
HTTP Module with Auto-Parse Disabled
For debugging purposes, you can disable automatic parsing in the HTTP module by checking Parse response = No. This lets you inspect the raw response string before attempting to parse it — useful when you're not sure if the source is returning valid JSON.
Common Make.com JSON Error Messages
"Invalid JSON"
The most generic error. The string you're trying to parse is not valid JSON. Root causes:
- Trailing commas after the last object key or array element
- Single-quoted strings instead of double-quoted
- Python
True/False/Noneinstead oftrue/false/null - Markdown code fences (
`json) wrapping the JSON
"Unexpected token X at position N"
More specific. The X character tells you what Make.com found where it expected something else:
Unexpected token T—True(Python boolean) wheretruewas expectedUnexpected token '— single quote instead of double quoteUnexpected token <— HTML tag; the source is returning an error page, not JSONUnexpected token }— trailing comma before}produced an unexpected closeUnexpected token ,— missing value, or a comma where a value should be
"JSON structure mismatch"
Make.com throws this when the JSON is valid but doesn't match the data structure you defined in the module's Data structure field. The fix is to regenerate or update your data structure to match the actual response shape.
"Unexpected end of JSON input"
The JSON string is incomplete — it was truncated. Common in scenarios where a webhook payload exceeds the Make.com module's data limit, or when an AI module's output is cut off.
Using the Parse JSON Module Correctly
The most common mistake: feeding raw text from an AI module directly into the JSON module without cleaning it first.
Correct setup:- AI Module (OpenAI, Anthropic, etc.) → output is a raw string in
choices[].message.content - Tools > Set Variable (or a Router with a basic transformer) → clean the string
- JSON > Parse JSON → structured output
Always add a cleaning step between your AI module and the JSON module. Even when the AI returns clean JSON 95% of the time, the 5% failure case will cause errors in your scenario history that you'll have to investigate and reprocess.
Handling AI-Generated JSON in Make.com Scenarios
When using OpenAI or Anthropic modules in Make.com, the model output is a text string. To reliably parse it as JSON:
Step 1: Prompt for clean JSON
Instruct the model explicitly:
Return ONLY a JSON object. No markdown, no code fences, no explanation.
Use this exact format:
{"field1": "value", "field2": 0, "field3": true}
JSON mode (available in OpenAI's API via response_format: {"type": "json_object"}) guarantees valid JSON output — use it whenever available.
Step 2: Strip markdown fences in a Set Variable step
In Make.com's Tools > Set Variable module, use the built-in text functions to clean the value:
{{replace(replace(1.content; "json"; ""); "```"; "")}}
This removes
json from the start and ` from the end. The 1.content is the output field from the previous module (replace 1 with your module number).
For stripping leading/trailing whitespace:
{{trim(replace(replace(1.content; "json"; ""); "```"; ""))}}
Step 3: Use a Code Module for complex repairs
If you need to handle Python booleans, trailing commas, or single quotes, Make.com's Tools > Set Variable text functions are insufficient — you need the Code module (available on paid plans).
Here is a complete repair function for the Code module:
javascript
// Input: rawJson — map from the previous module's text output
function repairJson(input) {
let s = String(input).trim();
// Strip markdown code fences
s = s.replace(/^``(?:json)?\s/i, "").replace(/\s``\s*$/, "");
// Python booleans and null
s = s.replace(/\bTrue\b/g, "true");
s = s.replace(/\bFalse\b/g, "false");
s = s.replace(/\bNone\b/g, "null");
// Remove trailing commas before } or ]
s = s.replace(/,\s*([\]}])/g, "$1");
// Single-quoted strings (simplified — handles typical AI output)
s = s.replace(/([{,\[]\s)'([^']+)'\s:/g, '$1"$2":');
s = s.replace(/:\s'([^'])'/g, ': "$1"');
return s;
}
const repaired = repairJson(rawJson);
try {
JSON.parse(repaired); // Validate
return { repaired, valid: true };
} catch (e) {
return { repaired, valid: false, error: e.message };
}
Map rawJson as an input variable from the previous module, then connect the JSON module to repaired from the Code module output.
Adding a Set Variable Step to Repair JSON with Regex
For scenarios where you don't have access to the Code module, Make.com's text transformation functions can handle the most common case — trailing commas:
In Tools > Set Variable, set the value to:
{{replace(replace(1.rawOutput; ",}"; "}"); ",]"; "]")}}
```
This is a blunt approach (it replaces ,} literally), but it handles the most common trailing-comma pattern from AI outputs. For more complex repairs, the Code module is necessary.
Handling Webhooks Returning Malformed JSON
Webhooks from third-party services don't always send valid JSON. If you're receiving webhook data in Make.com and the Parse JSON step is failing:
- Disable auto-parsing on the webhook module temporarily
- Log the raw body to a Google Sheet or Airtable record in the next step
- Inspect the raw string to identify the exact malformation
- Add a repair step before the JSON module
To log the raw webhook body in Make.com:
- Use Webhook > Custom Webhook module (not the built-in app webhook)
- Access
{{1.Body}}— this is the raw request body as a string - Write it to a log before any parsing
Testing JSON Before Building Scenarios
The fastest way to debug a Make.com JSON error is to reproduce it outside of the platform:
- Capture the raw JSON string from a failing execution (copy it from the error details or the log record you created above)
- Paste it into the JSON Validator — you get the exact line, character position, and a plain-English description of the error
- If the JSON is repairable, paste it into AI JSONMedic — it applies all standard repairs and shows a before/after diff
- Use the repaired version to understand the structure, then build your Make.com repair step to match
This workflow is faster than iterating on the scenario itself because you get immediate feedback without running the full automation.
For scenarios that receive JSON from external services, use the JSON Formatter to pretty-print the minified payload and understand its structure before building your data structure in Make.com.
Make.com JSON Debugging Checklist
When a scenario fails with a JSON error, work through this in order:
- Open the execution details — click the failing module to see the exact input it received
- Copy the raw input string — this is what Make.com tried to parse
- Check the first character — if it's
<, you're getting HTML, not JSON - Check for Python literals — search the string for
True,False,None - Check for trailing commas — look for
,}or,]patterns - Validate in the JSON Validator — get the precise error location
- Repair with AI JSONMedic — see exactly what needs fixing
- Add the appropriate repair step to your scenario before the JSON module
- Test with sample data using Make.com's Run Once feature before enabling the scenario
When to Use Parse JSON vs Automatic Parsing
| Scenario | Recommended approach |
|---|---|
HTTP request returns application/json | Automatic (leave Parse response = Yes) |
| Webhook with correct content-type | Automatic |
| AI module text output | JSON module, after a cleaning/repair step |
| Webhook body as raw string | JSON module, after inspection and repair |
| Field value containing a JSON string | JSON module |
| Debugging an unknown response | Disable auto-parse, log raw body first |
The general rule: automatic parsing is reliable for well-behaved APIs. Any time a human, AI model, or legacy system is involved in generating the JSON, add an explicit cleaning step before the JSON module.
Summary
Make.com JSON errors almost always trace back to one of four root causes: Python-style literals from AI outputs, trailing commas, single quotes, or markdown code fences. The platform's built-in text transformation functions handle simple cases, and the Code module handles everything else.
The fastest debugging workflow is to capture the raw failing input, validate it in the JSON Validator, repair it with AI JSONMedic, and then build your Make.com repair step to match the specific issues you found. One debugging session usually gives you a repair template that works for all future executions from the same source.
FAQ
Why does Make.com throw a JSON parse error even though my data looks correct?
Make.com's JSON parser is strict — it follows the JSON specification exactly. The most common hidden causes: AI-generated output with True/False/None instead of true/false/null, single-quoted strings, trailing commas after the last key, or markdown code fences wrapping the JSON. Use a Code module to normalize the data before any step that parses it.
How do I fix JSON from an AI step in Make.com?
Add a Code module (JavaScript) after the AI step and before any module that uses the JSON: const fixed = input.replace(/True/g, 'true').replace(/False/g, 'false').replace(/None/g, 'null'); return { fixed: JSON.parse(fixed) };. For more complex repair, use Make.com's HTTP module to call the JSON Repair API — POST the broken JSON and get back valid JSON.
What is the Code module in Make.com and when should I use it?
Make.com's Code module runs JavaScript or Python inside your scenario. Use it whenever you need data transformation that built-in modules can't handle: parsing non-standard JSON, string manipulation, custom calculations, or calling external libraries. It's the escape hatch for when Make.com's built-in transformers aren't powerful enough.
How do I debug a JSON parse error in Make.com?
Run the scenario manually and click on the failing module. Under "Input," check what the module received. Copy that raw value and paste it into the JSON Validator — it shows exactly what's wrong with a clear error message. Once you know the issue, add a Code module upstream to fix it before it reaches the failing module.
Can Make.com handle nested JSON from AI models?
Yes — use the Code module to parse and flatten: const data = JSON.parse(input); return { name: data.user?.name, email: data.user?.email };. Make.com's built-in JSON tools work with flat key-value pairs; nested structures need extraction in a Code step first. The HTTP module's response parsing also works well for structured API responses.
Still dealing with broken JSON?
Paste it in and get it fixed in under 1 second — free, no signup, no install. Works with ChatGPT, Claude, n8n, and any AI output.
Fix My JSON Free →Related Articles