Merge / Append of items not working as it should

You can see the node in the middle “Merge all Playlist Tracks”. The first one contains 2395 items and the second one has 2062 items after looping 11 times. So there should be 4457 items after append but there are just 2396.

The one item that is added is also empty. Before I tried combine with keep everything but it had the same result. What is the problem?

n8n Version is 1.27.2
Database: sqlite
Running n8n via Docker
Operating system: Linux

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@CptDayDreamer What rules have you used on the merge node? Theabove meay be happening if you use a merge option on the node

What you have done in your case is Merge based on a common field. If there are no matching fields then the results wont be there

Sorry. What do you mean? Yeah my first merge node looks like this with append:

The items have the exact same structure so even merge based on fields should work but it does not.

The second node:

And I also tried to do it like the second node for the first node with the output type difference.

@CptDayDreamer its not. Mine is “append” yours is “combine”

The second one yes. I’m talking about the Merge all Playlist Tracks ones. The tracks already disappear there if you see the first image.

This might help Merge | n8n Docs

No it does not. I’m using append for the first merge with 2500 and 2000 elements but it does not work.

Somebody with an idea?

Are you trying to simply append the data together into a single list? Or are you trying to match the data onto a unique ID between them, aka “zipper together”? If the former, Mode: Append is correct, or you can try an Aggregate node. However I suspect the latter, which would require Mode: Combine, Combine Mode: Merge By Fields. Have you tried that?

First I want to append them into one list because I want all tracks of 20 playlists or even more and need multiple filters for this because there only can be 10. After that the list that got appended is checked against another playlist or better said the tracks of it.

I guess you can call it zipper together. I just want to merge two lists to one big list in the first merge node (the append one). I also tried combine with merge by fields and keep everything like in the node after that. You can click on it. But it had the same effect instead of append.

I’ve been considering trying n8n with my Spotify, so I duplicated your macro and tested it for myself. I was able to get the Merge to work just fine. Which version of n8n are you using? Mine is 1.28.0. Screenshot below showing the exact same node results as your screenshot a few replies back.

1 Like

I’m confused that it works for you. Then it should also for me. I’m on version 1.27.2. I guess I have the latest Docker one but if you have a newer one I have to check.

The latest image is 1.27.2 but I explicit used 1.28.0 now but it’s the same for me. I don’t know how it’s working for you.

See this:

First loop and somehow I have also 2 runs on the merge node. You only seem to have one.

Second loop and second run:

Why 2 runs??? and why so wrong

I fixed it! It was in settings of the flow…

The execution order was set to v0 legacy. It has to be v1 recommended. I don’t know why. I guess because I copied an old flow from the templates. I guess you already had set it to v1.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.