I have a use case where I need to process each item in a list separately, for example running an enrichment check on every IP address in an alert. I know traditional looping works differently in Tines than in code, and I’m not entirely sure I’m doing it the right way. How do others handle iterating over lists?
Tines handles iteration through the Explode action, which takes in an array and creates a separate execution path for each item. It’s conceptually different from a for-loop in code, but very powerful once it clicks. Each item gets its own isolated execution, so you can enrich, transform, or act on them independently without them interfering with each other, so each individual IP address would be iterated on and could hit an HTTP Request that enriches it.
For large lists, it’s worth thinking about rate limits on any downstream APIs you’re calling per item. Pairing an Explode with a Throttle action or additional retry headers keeps things from breaking at scale.
If you need to collect the results back together after processing each item, you can utilize the Implode action which combines the results back into an array.