Clarification on Input Order Behavior Across Nodes (Outside of Merge)

Hi all — quick clarification request:

I’m working with ChatGPT to build some automated workflows in n8n (v1.94.1), and it often suggests connecting inputs in a specific order (e.g., “connect this branch as Input 1”). However, in my experience, most nodes in n8n don’t expose an “Input 1” or “Input 2” label — that seems to only be a thing in the Merge node.

So my questions are:

  1. Outside of the Merge node, is there any way to control or rely on the order of inputs into a node?
  2. If I do use the Merge node to enforce an order, does that ordering persist downstream? (e.g., if I connect a Merge node to a Code node, can I rely on the ordering of those merged inputs?)

Just trying to get clarity, because my LLM assistant keeps giving me advice based on assumptions that may not apply in n8n.

Thanks in advance!

The Merge node allows you to combine data from multiple streams. When you select the Combine by Position option, n8n will combine the input elements based on their relative position. This means that the first element of Input 1 will be combined with the first element of Input 2, the second with the second, and so on. This option is useful when you want to maintain a consistent order when combining data from different sources.

After combining the data, if you need to ensure the elements are in a specific order, you can use a Code node to explicitly sort the array of objects. For example, if you’ve added an index field to your objects, you can sort them as follows:

items.sort((a, b) => a.json.index - b.json.index);
return items;:contentReference[oaicite:29]{index=29}

This approach gives you complete control over the order of the data before processing it in subsequent nodes.

It’s important to note that the order in which you connect nodes in the n8n visual editor doesn’t guarantee a specific execution order. The n8n execution engine determines the processing order based on the flow logic and dependencies between nodes, not on the visual layout.

Therefore, if the processing order is critical to your workflow, you should implement explicit mechanisms, such as those mentioned above, to ensure the desired order.