FTP Node using data from previous nodes

Hello n8n experts!

I have a workflow that generates a CSV files that needs to be uploaded into an FTP. I’m having issues to name the csv file.
The csv file name should come from a previous node but something is not working. I’ve created a simple workflow to reproduce the error (the actual workflow has other inputs and nodes).

Here you can see the error message:
ERROR: Can’t get data for expression under ‘Path’ field
To fetch the data from other nodes that this expression needs, more information is needed from the node ‘SFTP

Thanks in advance for your support!

The workflow:

n8n version: 1.17.1
Database: postgresql 14.8
n8n execution mode: queue
running via: kubernetes
operating system: amazon linux

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:

Hey @Fortian,

You got me there, I can’t work out what it is after but I did find that using {{ $('File Name').first().json.filename }} will work so assuming the previous node you want the data from has the same name all will be good.

You also don’t need the Spreadsheet node there you can just use the path and the new name in the upload and will rename it on the way up.

I will do some more digging into the node to see if I can work out what is going on.

1 Like

Thanks @Jon!

I’m curious to see what the outcome of your digging is!
I will flag the thread as solved though.

1 Like

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