Flows "merge" with only one active path

Describe the problem/error/question

I often have workflows that split at some point and then need to “merge” again - but without data from both lines … i just want to use the split out data return in a single flow afterwards - like you would when you have a sub-workflow trigger at that point - without making a subworkflow.

if i connect both nodes to the subsequent one, then i have the issue, that those inputs are not handled as one. so accessiond $json.data is not simply taking the input of the one input that gets data …

How can i do this? as i am maybe simply missing the correct term.
GPT told me to use a merge - but that is waiting for two inputs - i simply want one of the paths to execute … like a reverse switch.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

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:

can it be that this is only failing in step by step testing? (when clicking the play button on top of each node?

Yes, it could. In step by step the two merging branches will not run simultaneously. Generally speaking the top branch is executed first and the the lower branches follow in that order. This also will result (from your screenshot) in Switch node running (iterating) more than once (twice in your case) if both incoming branches have data.

thanks for the info!
in the screenshot - if only one branch is carrying data - this is executed once, correct?

Yes, it will runs only once (working on any item in the set produced by the top branch only).

1 Like

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