FTP node not mapping the directory

I have a workflow that searches for files on the Gdrive folder and downloads them to a local NAS.
The workflow is supposed to work in this way:

  1. At a certain time of the day start the workflow
  2. Get today’s date, format it as Month_day_year
  3. SSH into the NAS and create a directory called Month_day_year
  4. Access Gdrive at a specific folder and download all the files
  5. FTP into the NAS and upload the files inside the newly create folder Month_day_yyyy
    The issue is that the workflow works but the FTP node does not see the new directory, so it falls back into the main directory, which requires me to manually separate the files based on the day they were copied.

The SSH correctly creates the new directory (verified with FileZilla)

The FTP node works but it’s like not seeing the new directory at all

Can somebody help me understand what is that i need to do or i am doing wrong?

Self-hosted
Ver 1.72.1
Docker
Debian Server

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:

Hi There,

Most likely you need to change your expression a little.
As you are refering to a node outside the loop things can get messy.
I personally never use the reference to $(‘node’).item.json.
In this case you can probably fix it by swapping .item for .first(0,0)
so that would be something like this, with of course the correct node name and the selection for the correct field after json.

$(‘node’).first(0,0).json

Thanks, BramKn, i change dit this way /FTP_Backups/Billing/{{$('SSH').first(0,0).json.stdout}}/{{$('Download all files 1-by-1').item.json.name}} but it is still not working (folder skipped)

Any other way I can solve this issue? It seems such a simple workflow but it’s causing me quite a bit of headaches (i am a newbie with n8n)

ur image shows that your stdout is empty. So yeah that makes sense. probably best to just grab the name from where the ssh node gets it.

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