Iterator Tool
IN THIS ARTICLE
The Iterator tool takes an array of objects and splits it into separate elements so you can work with each one individually.
In Albato, each object in an array is called a "String". The array itself is called "Strings". A typical example: a CRM deal with multiple line items. Each item is a String, and the full list of items is the Strings array.
Every item has its own fields — name, quantity, and so on — and they all arrive together in one array.
Example:
{
"dealName":"Deal 1",
"items": [
{
"name":"Product 1",
"quantity":"2"
},
{
"name":"Product 2",
"quantity":"5"
}
]
}
Once you add the Iterator to your automation, it processes each element one at a time. Every step after the Iterator runs once per element. So if the array has two items, those steps run twice.
You can also add other Albato tools after the Iterator to process each element further.
When Should I Use the Iterator?
Say you want to create an item in Inflow for each product in a Bitrix24 order. The problem is you don't know how many products each order will have.
Place the Iterator before the Inflow New Item step. The Iterator will split the order into individual products, and the Inflow step will run once for each one. Five products in the order means five items created in Inflow.
How to Set Up the Iterator
CoinMarketCap and Telegram
We want to receive a Telegram message when a cryptocurrency price changes, but only if the change is more than 1%.
First, create an automation with CoinMarketCap and Telegram.

Click the + button to add a tool.

Select the Iterator from the list.

Choose the string from CoinMarketCap that you want to split into separate elements.

In the Telegram step, select the variables to include in the message.

The automation is connected end to end. One issue: CoinMarketCap sends price change values as raw numbers with many decimal places.

Add the Math Operation tool after the Iterator and before the Telegram step.

In the settings, pick where to apply the operation, set the rounding type, and choose the number of decimal places.

Now each value gets rounded before it reaches Telegram.

Last, add a filter before the Telegram step to send the message only when the price change is above 1%.

Set up the filter condition like this.

Save and run the automation.

Messages will now only come through for coins that moved more than 1%.
Conclusion
Now you can use the Iterator to handle arrays of any size in your automations — orders, deals, price feeds, or any other list of objects. If you have questions, reach out via the chat.
Did this answer your question?