Loop block failing on Data Action JSON array reference

Wondering what the right way is to spin through a JSON array that comes back from a Data Action. The external call works fine but the response nests everything under a records key. Trying to feed that into a Loop block in Architect keeps breaking the flow. The system complains about invalid data types when the loop tries to read the first item. Timeout settings are already bumped up, but that doesn’t fix the parsing side. It’s gotta be the reference syntax. Here is the payload shape and the loop config I’m testing.

{
 "data": {
 "records": [
 { "id": "101", "status": "open" },
 { "id": "102", "status": "closed" }
 ]
 }
}

Loop Block Input: ${sys.dataActionResponse.data.records}
HTTP Status: 400
Error: Expected array at index 0

You’re feeding the whole object into the loop instead of the array itself. Change the reference to {{DataActionResponse.records}} and it’ll parse the items correctly.

Yeah, that was the missing piece. I switched the loop input to {{DataActionResponse.records}} and the flow stopped throwing those type errors.

It’s a bit annoying how the documentation shows the whole response object in the examples, but the loop block specifically expects an array at the root level. Since records is the array inside that object, drilling down one level fixes it.

For anyone else running into this, make sure your Data Action response schema actually defines records as an array of objects. If it’s coming back as a stringified JSON blob, you’ll need a Set Variable block to parse it first before the loop will even see it as a collection.

Thanks for the quick fix.