Wait for an iterator to finish before sending webhook Response

My scenario starts with a webhook which triggers an http request which array of collections, I used an iterator to loop through each of them and save them into a JSON, I want to send the JSON content back through the webhook response. But currently it’s sending immediately after the 1st collection is added to the JSON, how can I send the JSON only after the iterator is done?

Using a text aggregator should consolidate all the iterations into one file, which you can then send to the webhook or wherever you need.

If you can, share some screenshots and the blueprint. We could help further if that does not work.

2 Likes

I tried an Array Aggregator, but that didn’t work

Did you try a text aggregator from the tools section?

image

2 Likes

I did try, but same result

I think you’ll have to ‘close’ the iterator module 3 if you want to avoid that.

Right now that’s iterating, and everything behind it is going to be done with the first bundle that comes through iterator 3. And afterwards, it’ll process bundles 2, 3, 4…

3 Likes

@NolaDigital, would you explain what you mean by ‘close’ the iterator?

Thanks a lot, that worked

2 Likes