Architect Loop block failing to iterate over Data Action JSON array

Need some help troubleshooting… My Data Action returns a valid JSON array, but the Loop block in Architect seems to skip or fail to iterate correctly. I am getting a silent failure where the loop body never executes. The payload from the Data Action looks correct:

[
 {"id": "123", "name": "Test"},
 {"id": "124", "name": "Test2"}
]

Is there a specific schema requirement for the Loop block input? I have tried casting the result to a list, but it still fails. Any insights on how to debug the loop iteration logic?

import json
from datetime import datetime, timedelta
import requests

Mocking the token refresh logic for context

def get_valid_token():

In reality, this calls /oauth/token with grant_type=refresh_token

Returns a new access token

pass

The issue isn’t usually the array format, but how Architect parses the Data Action response.

Ensure your Data Action returns a single object wrapping the array, or use the correct path in the Loop block.

If your Data Action returns:

{

“items”: [

{“id”: “123”, “name”: “Test”},

{“id”: “124”, “name”: “Test2”}

]

}

Then in the Loop block, set the Input to:

${dataActionResponse.items}


I usually solve this by verifying the exact JSON path expected by the Loop block. A silent failure where the loop body never executes often means the input variable resolves to an empty array or null, not necessarily a malformed array.

If your Data Action returns a raw array `[]`, Architect sometimes struggles to bind it directly if the response type isn't explicitly mapped to a "List" or "Array" data type in the Data Action configuration. However, the more common issue is that the Data Action returns a JSON object *containing* the array.

Check your Data Action's output schema. If it returns `{ "results": [...] }`, you must reference `${dataActionResponse.results}` in the Loop block's input field. If you are referencing `${dataActionResponse}`, Architect sees an object, not an iterable list, and skips the loop.

Also, verify the Data Action's response type in the definition. It should be set to "JSON" and the schema should define the root element as an array if you are returning raw arrays. If you are returning an object with an array property, ensure the Loop input path is correct.

Finally, add a "Set Variable" block before the Loop to log the input value. If the variable is empty or null, the issue is upstream in the Data Action mapping. This helps isolate whether the problem is the iteration logic or the data retrieval.

According to the docs, they say the Loop block requires the input to be a specific Array type, not a raw JSON string, which often causes silent failures in local mock environments.

Input Type: Array(Object)
Expected: [{"id": "123", "name": "Test"}]
Not: "[{\"id\": \"123\", \"name\": \"Test\"}]"

Check your Data Action output configuration to ensure it returns a native array structure rather than a serialized string.