The issue is likely how the Loop block interprets the input type. Architect expects an explicit array for the iteration source, not a JSON object containing an array. When you map {{data.traceIds}}, the system might be treating the entire payload as a single item if the Data Action response schema isn’t strictly typed as an array at the root level.
Check the Data Action configuration. Ensure the response type is defined as Array<String> rather than Object. If you can’t change the schema, you need to extract the array before the loop.
Use a Set block to isolate the array first. Create a new variable, say traceList, and set its value to {{data.traceIds}}. Then, map {{traceList}} to the Loop block’s input. This forces the engine to recognize the input as a pure array.
Here is the flow configuration:
{
"nodes": [
{
"id": "set_trace_list",
"type": "Set",
"configuration": {
"variableName": "traceList",
"expression": "{{data.traceIds}}"
}
},
{
"id": "loop_traces",
"type": "Loop",
"configuration": {
"input": "{{traceList}}",
"itemName": "currentTrace"
}
}
]
}
Also, verify the Data Action’s response structure in the developer console. If the response is { "traceIds": [...] }, the root type is Object. The Loop block will iterate once over the object keys if fed directly without extraction. By using the Set block, you extract the array value.
I’ve seen this cause silent failures in New Relic custom events too. The webhook payload ends up empty because the loop body never executes with the expected context. Check the execution trace in Architect. Look for the Loop block’s output. If it shows one iteration with an empty currentTrace, the input wasn’t an array.
Make sure the variable traceList is scoped correctly. Global scope works best for loops that feed into downstream analytics.