Very Simple Question about Merge Node

Describe the problem/error/question

I’m trying to understand some basic functionality.

  • Case 1: If neither Edit Fields note is executed, executing the Merge node does not execute the upstream nodes. Why not? Can I change that functionality?
  • Case 2: If one Edit Fields node is executed, executing the Merge node executes the other upstream Edit Fields node. Why now and not in Case 1.
  • Case 3: If one Edit Fields node is executed, executing the other Edit Fields node causes the other one to be ‘un-executed’. What causes that? Is there a way to avoid it?

Information on your n8n setup

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

@RichardC , the answer depends on different conditions. Those conditions can change behavior you described. They are

  1. Execution order configured in the workflow Settings
  2. Connections within the workflow (for example, is “Edit Field2” loose (nothing leads to it) or not)

The executions order exists in 2 versions, v0 and v1. The difference between the two is described in n8n v1.0 migration guide | n8n Docs. In other words, depending on the execution order your statements (cases) might not be true as different execution logic is applied. See if that post answers your questions. If not we can discuss it further but also add what version you are applying. I believe you have v1 logic but if you change to v0, you will get a different result.

3 Likes

Thanks for your thoughtful response. Yes I’m using v1.

My questions mostly relate to manual executions while debugging etc. I was going to ask how I can stop nodes from being ‘un-executed’ but I have since discovered how to Pin nodes which is very useful.

I’ve used Node Red for a while, but am new to n8n. Very impressed so far, although like most things it takes a while to get a “feel” for the sweet spots. Thanks for the assist.

Richard

1 Like

I’m not surprised you are impressed :slight_smile: . In my personal opinion, n8n is the best workflow automation tool. Surely as any product in a competitive market, it has its advantages and disadvantages. However, overall n8n beats them all.

I was going to ask how I can stop nodes from being ‘un-executed’ but I have since discovered how to Pin nodes which is very useful.

Another tip for debugging. When a failure takes place during automated execution, hit “Copy to editor” button and the nodes that query external API will get pinned for you automatically with the data that was already there at the time of failure so that you can pick up the state of the workflow from where it was at the point of failure. Just make sure to unpin again before saving the updated workflow.

1 Like

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