Working with JSON in Custom Actions
When configuring a Custom Action that expects a response, Adalo requires the response body to be valid JSON. If the JSON is not structured correctly, Adalo will not parse it into outputs and may instead display the entire response as a text blob.
✅ JSON Rules
Content Type The response must be returned with the header:
Content-Type: application/json
Responses must always start with
{
and end with}
.Each key must be wrapped in double quotes:
{ "key": "value" }
Multiple key/value pairs are separated by commas:
{ "image_url": "https://example.com/image.jpg", "status": "ok" }
The last key/value pair should not end with a trailing comma.
⚡ Common Pitfalls
Escaped JSON
"{ \"image_url\": \"https://example.com\" }"
This looks correct, but it’s actually a JSON string containing escaped characters. Adalo will not parse this.
✅ Fix: remove the wrapping quotes and escapes.
Missing or Extra Commas
{ "a": 1 "b": 2 } // ❌ Missing comma { "a": 1, "b": 2, } // ❌ Trailing comma
Both will cause parsing errors.
📌 Best Practices
Always test the response in a JSON validator before using it in Adalo.
Keep keys simple and use lowercase with underscores (e.g.,
image_url
,ok
,message
).Configure matching Outputs in Adalo with the same names and types as the JSON keys.
✨ In short: Adalo will only recognize outputs if the response is valid JSON with proper formatting and the correct Content-Type header.
Last updated
Was this helpful?