I want to use an iterator to run an action e.g. 10x times, and then after getting the result of these 10 iterations, continue the scenario with this batch of data ready for the next steps, let’s say with actions A and B
I do not want to run the actions A and B within the iterator, but after all the iterations have finished
Currently, I’m failiing to move the data from the top edge of the iterator (once those actions are done) to the one to the right of the iterator.
You can use the Set Variable node to build an array within the iterations. Then use Get Variable to the right of the iterator to retrieve the accumulated data.
To get all iteration results in a single response, we need to create an intermediate buffer (let’s call it a collector), such as a local or global variable. This is done using the ADD operator at the end of each iteration cycle.
In other words, with each new iteration, you update the variable by adding the new data to it.
Here’s an example: (We created a template with an example to help you better understand how to work with it.)
As you can see, by setting up this logic, with each new iteration, the array from the “collector” node will store each new value and then return it via the “get variables” node.
In brief, it is used only in conjunction with Set variables (and even then, not always). Its primary purpose is to provide access to necessary variables at any point in the scenario, such as in other branches, etc.
It is quite rarely used; in most cases, the standard Set variables is sufficient.