Split array of objects, query, consolidate again

Describe the issue/error/question

Seems like sth very easy. I’ve wasted 4+h on this so far.
Let’s say I have the following object:

"ID": "000001",
"Wohnungseinheiten": [

I need to lookup data for each entry of the array “Wohnungseinheiten”, combine that into an array, and replace it in the original data. Basically just looking up and replacing these IDs with the data itself.

So I use an item list to split the array:

"Wohnungseinheiten": "H-fQ8IAyQICPD4XfM1LJ8g"
"Wohnungseinheiten": "H5NahaPTS9ygL0lae0mLbA"

I lookup the data with one note that gets executed once for each item.
So far that works.
But I need to look up one more array of data and can’t seem to get that to work.

"Sanitärbereiche": [

Here is a demo what I’ve tried last.

Can somebody tell me why I cannot access the earlier node’s item in the second run of the batch?
First try seems to work just fine, but second one fails (marked blue in screenshot below)…
Might be my outdated version of n8n, so far I haven’t checked bug fixes for split in batches node, only for seatable node.

Information on your n8n setup

  • n8n version: 0.164.1
  • Database you’re using (default: SQLite): Postgres
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hi @leprodude

There is a community node that would help you with this issue I think. Only had a very quick look at the question so excuse me if I understood wrong.
*You would need an n8n update to use community nodes I think.


Ouh this looks interesting. Thanks for the link, I will check it out!

Looks like [email protected] might be all I need:

Will update after upgrading my version.

1 Like

I have finally solved it. Thanks to @BramKn and the item lists node additional feature of [email protected] <3