When trying to use an array currently its only outputting the first result, there are some programming trickery functionNodes that get it working, but some people just struggle with that and it wastes a lot of time.
Other similar services like Zapier and Integromate have an Iterator node that takes the multiple arrays and keeps iterating over and over until done.
As long as the data is structured correctly, all nodes (with a few exceptions) will do the iteration for you behind the scenes. If the functionality you need is no available, you can always use the HTTP Request node with a function node to map the data to the right structured.
I have never used iterator on those platforms but I would bet iterators are the same as the SplitBatches Node in n8n.
Thanks for your post! The way n8n handles items means a âloopâ or iterate node is less likely the solution but instead a Map/ Transform node is required (i.e. to get nested objects into what n8n considers an âitemâ - i.e. a top-level object in the array being sent into a node, since n8n performs actions per-item by default).
Just wanted to say that totally hear you on this one - I am currently performing research on best way to remove 70-80% of the need to use Function node for general data mapping/ transformation. Weâre proceeding with a bit more caution on this node since we donât want to put out some ill-conceived hacky solutions, then be supporting half-baked mapping nodes (for example, weâre supporting both Interval + Cron trigger; but in hindsight they could probably be one node just with various options). Once a node is released, we try hard not to make breaking changes or deprecate them so that usersâ active workflows are not impacted.
On that note, if you can think of great examples of data mapping no-code patterns in other tools, please do share! Or simply listing the types of abstract transforms you envision needing to do often is also very valuable.
Honestly look at how integromat does it, if they didnât charge for every single action/iteration I would still be there. Some of these scenarios are doing API lookup on an API lookup which when you think has over 1000+ results in the first lookup which then does another 1000 API lookups, gets expensive to use their cloud system per action.
Data transformation and data mapping in n8n could definitely be improved, and weâre working on a master plan for that.
Integromat have put a lot of thought into how they do it, but our approach is fundamentally different to theirs: we have iteration built into every node by default. So as you mentioned, all that needs doing is to split the things you want to iterate over out into items. Adding a node for this will be part of the data transformation overhaul.
How we can use this iteration?
For exemple i have this expression that I use to select a string. {{$node["NocoDB"].json["job"]["core"][0]["version"]}}
How I can set it up so that the action will be repeated for every object in the CORE array ?