General Question on n8n

I would like to ask some general questions on n8n. I have started using it recently. I notice that: • Data flows linearly from one node to the next • Each node only receives data from its immediate predecessor So, if I need to retrieve data NOT from its immediate predecessor, I need to have the Merge node, am I correct? This leads to quite a messy flow with many Merge nodes. Or maybe I am not expert enough and there are better workarounds. I cannot imagine when the project becomes bigger, the whole flow would look very messy. I know that the other competitior Make.com actually allows their modules to have access to the data from any previous module in the scenario. This avoids the messy and unnecessary Merges.

Hi @TH1
Welcome to the community
You don’t need to worry about adding too many Merge nodes . You can use the pin function on any node to grab the data you need without running the whole workflow. Also, in the input fields you can switch to Expressions and use {{ $json.fieldName }} to pull data directly from a previous node.

You can access other nodes data by providing the node name in expression.

instead: {{$json.body.result}} → comes from previosly node

Use: {{ $(‘HERE NODE NAME’).item.json.result }} → assuming this node is 2 or more nodes back.

Or from agent: {{ $fromAI(“variable”) }}

can you illustrate with some examples based on my workflow? how does this pin function comes in? is it replacing the Merge?

P.S to acces output of AI Agent tools results , you have to choose Option in agent, Return Intermediate Steps. Then in other nodes just call the: {{ $json.intermediateSteps[0].observation }} → 0 assuming is the last tool called.

Pinned Data is just for testing… means you don’t have to run whole workflow if Data is persistent and can just run node by node without empty output.

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