How do I set variables for each bundle

This is my scenario, I am generating an array from reading a google sheet that contains information about deals and their chat IDs. The flow then searches for the deals in the hubspot CRM depending on the deal stage

this takes up 1 operation but produces multiple bundles which is fine.

when I get to the set multiple variables module I use the array to set certain variables for each bundle that is valid from the CRM search. However it doesn’t iterate through the array. It only stays on the first item in the array giving each bundle the same values for each variable.

when I use an iterator to go through the array, it takes more than 1 operation to generate the same bundles each time, I assume this is because I was placing it after the hubspot module or before the set variables module. When I do this it causes the set variables module to run multiple hundred of times which isn’t efficient at all

I just want to iterate over the list once and also search for the deals once without having to generate extra bundles or use extra operations so that I can set the variables to the data associated with each bundle and not just the first array value.

Have you tried Get or Map functions on arrays? it can save operations in case you need to map that info without iterating. if those items in array needs individual processing than you have to use iterator.

Solved it using the get and map functions to identify the index of each bundle in the array and then using the index to map the values associated with each bundle.