Docs state: “The Loop block iterates over the items in an array. The input must be a valid JSON array.” I’ve got a Data Action configured to call an internal endpoint that returns a simple list of user IDs. The HTTP status is 200, and the response body is definitely a JSON array. I’ve verified this in Postman.
Here’s the payload I’m seeing in the debug logs:
["12345-abc", "67890-def", "11111-ghi"]
I’m mapping the Data Action’s response directly into the Loop block’s input variable. The variable type is set to String. When I run the flow, the Loop block executes, but it only processes the first item, then exits. It doesn’t loop through the rest. I’ve checked the loop counter, and it stops at 1.
I’ve tried changing the variable type to JSON Object, but that throws a type mismatch error in the Data Action mapping. The docs mention that the input must be an array, but they don’t specify how to handle the type conversion between the HTTP response and the Loop block.
I’ve also tried parsing the JSON string in a prior Set Variable block using the JSON.parse expression, but Architect doesn’t support that natively in expressions. I’m stuck. The Loop block seems to expect a specific format that the Data Action isn’t providing, even though the raw data looks correct.
Is there a specific way to format the output from a Data Action so that the Loop block recognizes it as an iterable array? Or is this a known limitation with how Architect handles JSON arrays from external calls? I’ve spent hours on this, and the documentation is silent on the exact data type expectations for the Loop input when sourced from a Data Action.