Access to item from another node after FTP nodes

Describe the problem/error/question

I am using a simple flow, but the last one can access to items of the second one
But during the configuration, value is retreived

I tryed to prefix the expression of Old value with $item(“0”)., but it doesn’t work too

What is the error message (if any)?

ERROR: Can’t get data for expression under ‘Old Path’ field
To fetch the data from other nodes that this expression needs, more information is needed from the node ‘FTP1‘
Missing pairedItem data (node ‘FTP1‘ probably didn’t supply it)
31/07/2023 17:59:27
Item Index: 0 | In or underneath Parameter: Old Path
Data below may contain sensitive information. Proceed with caution when sharing.
"=/{{ $('Set').item.json.Filename }}"
ExpressionError: Can’t get data for expression
    at createExpressionError (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/WorkflowDataProxy.js:457:20)
    at pairedItemMethod (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/WorkflowDataProxy.js:688:43)
    at Object.get (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/WorkflowDataProxy.js:729:40)
    at Proxy.eval (eval at _create (/usr/local/lib/node_modules/n8n/node_modules/@n8n_io/riot-tmpl/dist/tmpl.js:388:14), <anonymous>:3:81)
    at Proxy.eval (eval at _create (/usr/local/lib/node_modules/n8n/node_modules/@n8n_io/riot-tmpl/dist/tmpl.js:388:14), <anonymous>:3:154)
    at Object._tmpl (/usr/local/lib/node_modules/n8n/node_modules/@n8n_io/riot-tmpl/dist/tmpl.js:335:60)
    at Expression.renderExpression (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:219:25)
    at Expression.resolveSimpleParameterValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:197:34)
    at Expression.getParameterValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:281:25)
    at getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1286:42)
    at Object.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1511:24)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:481:46)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:646:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:631:53

Please share your workflow

Information on your n8n setup

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

I am not confident this will help, but I notice your old path is

I can’t help but think you need to have an absolute path that includes the drive letter, but I maybe wrong. I wish I could be more help, but have you tried getting the absolute path and not the relative path?

1 Like

Thanks for the answer, but the problem really not the FTP node by itself, it is really I can’t access to value of another node

Ah I understand now.

To keep what you have now, maybe reference the data in this way and see if it works:

{{ $('Set').item.json["Filename"] }}

instead of

{{ $('Set').item.json.Filename }}

I understand your formatting should work, but if you click on expression, and then hit the little expand option at the bottom right, you will see the ability to choose previous nodes on the left. It looks like this:

Hope this helps!

Nice try :wink:

I have the same result

An other idea?

Hi @ppcm, my best guess is that the FTP node simply can’t support paired/linked items which is what the .item expression relies on. So perhaps you want to use the Merge node to overcome this limitation?

Like so:

On your second FTP node, you should then be able to use an expression like $json.Filename which relies only on directly incoming data rather than the pairing logic across multiple nodes.

Once again, you give the right indication!
Merge is the good way, I only the configuration to output the Input 2 in which usefull data are stored


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