JSON path mapping returning undefined in Data Action success output

Hitting a snag with an HTTP POST data action. The external API returns a 200 with {"data": {"id": "123"}}, but mapping $.data.id in the success output yields undefined. Tried switching to $.data['id'] and flattening the response, no luck. Any idea why the JSON path parser is choking on this simple structure?

2 Likes

Are you parsing the response body before mapping? The data action needs application/json in the Content-Type header, otherwise it treats the payload as a string. Add this to your request headers and retry.

"headers": {
 "Content-Type": "application/json",
 "Accept": "application/json"
}
1 Like