Getting weird behavior with the Loop block in Architect.
I have an External Data Action that calls a simple HTTP GET endpoint. The response body is a standard JSON array of objects. Here is a sample payload:
[
{"id": "101", "name": "Item A"},
{"id": "102", "name": "Item B"}
]
The Data Action returns this successfully. I can see the raw response in the debug logs. The return type is set to JSON.
I then add a Loop block. I set the input to the Data Action’s result field. I expect the loop to run twice. It runs once. The variable loop_item contains the first object correctly. But the second iteration never happens. The flow just exits the loop.
I tried changing the loop condition to loop_index < length_of_array. Still stops after one. If I hardcode the array in a Script action using RETURN [obj1, obj2], the loop works fine. So the logic is right. The issue is specifically with the array coming from the External Data Action.
Is there a specific format required for the Data Action return value to be recognized as an iterable array by the Loop block? Or do I need to parse it first?