Hello Community,
I am implementing a workflow to iterate over a list of users. The users are taken from the “HTTP Request” action over the “List Governance Group Members” API.
The action is correctly configured and returns the correct data in an array.
I need loop over the body of the response and operate on its elements.
The loop is configured as follows:
- Loop input: $.hTTPRequest.body
- Context: $
You can double check it on this screenshot:
When I test the workflow, however, it fails and the Loop never iterate over the elements. By checking the test data this is what I see:
HTTP Request action > Step Output:
{
"body": [
{
"email": "[email protected]",
"id": "086da00565bd48cdb2061b92a6b47ac4",
"name": "L---- P--------",
"type": "IDENTITY"
},
{
"email": "[email protected]",
"id": "60e744fd3917488682b6e2a3b134c46b",
"name": "M---- C---------",
"type": "IDENTITY"
}
],
"headers": {},
"responseTime": "0.419180 seconds",
"statusCode": 200
}
You can see from the output above that the response is correct and the body is an array of 2 elements.
Let’s have a look to the Loop Operator instead with particular focus on its loopInput:
Loop Operator > Step Output:
{
"context": {... },
"definitions": {...},
"payloads": [
{
"loopInput": {
"email": "[email protected]",
"id": "086da00565bd48cdb2061b92a6b47ac4",
"name": "L----- P-------",
"type": "IDENTITY"
}
},
{
"loopInput": {
"email": "[email protected]",
"id": "60e744fd3917488682b6e2a3b134c46b",
"name": "M---- C--------",
"type": "IDENTITY"
}
}
]
}
The loopInput is present twice and it holds the correct values and elements.
I tried multiple times but it never proceeds with the loop iterations.
This is how the loop appears during the test:
The actions before and after the loop are executed correctly.
Why the loop doesn’t iterate over its elements?
Any information could help me a lot!
Thank you