Just noticed something weird. The REST Proxy call inside a Data Action works fine. Status code is 200. But the success output variable is always undefined.
The API returns a simple JSON object. I can see it in the logs. But the mapping seems to drop it.
Here is the Data Action config.
{
“name”: “GetCustomerProfile”,
“actions”: [
{
“type”: “RestProxy”,
“settings”: {
“url”: “https://api.internal/customer/{{trigger.data.id}}”,
“method”: “GET”
},
“onSuccess”: {
“next”: “ReturnData”,
“set”: {
“profileData”: “{{$.response.body}}”
}
}
},
{
“type”: “Return”,
“settings”: {
“data”: {
“profile”: “{{profileData}}”
}
}
}
]
}
The {{$.response.body}} part is the issue. I’ve tried {{$.response}} too. Same result.
In the Studio execution trace, the RestProxy step shows a 200 OK. The response body contains the JSON. { "name": "Test User", "tier": "Gold" }.
But when it hits the Return action, profileData is null.
I’ve checked the JSON path. It’s valid. The API response is standard. No weird headers. Content-Type is application/json.
Maybe the RestProxy action doesn’t automatically parse JSON? I thought it did. The documentation says it handles standard HTTP responses.
I tried adding a Transform action before the Return.
{
“type”: “Transform”,
“settings”: {
“input”: “{{$.response.body}}”,
“output”: “{{json.parse(input)}}”
}
}
Still undefined. The Transform action fails silently. Or maybe it just passes the undefined value through.
Is there a specific way to reference the REST response body in a Data Action? The trigger data works fine. {{trigger.data.id}} resolves correctly. Just the REST response is ghosting me.
I’ve restarted the script. Cleared cache. Nothing.
Anyone hit this? The API works in Postman. The Data Action calls it. But the data never makes it to the output variable.