Trigger if file present on FTP

Hello,
I want to execute a workflow when a CSV file is uploaded by a user on a distant FTP server (then download it and do an api call for each line from the CSV file).
As there is a “local file trigger” but there is no trigger for file on FTP, i use a interval trigger that execute every minute and then in the workflow i list the content of the FTP server in the “incomming” folder to check IF there is a file.

  • If there is no file > end of the workflow (noOP)
  • If there is a file > i download it and work on it …

The problem is that the workflow get executed every interval, consumming resources and increasing the number of my workflow executions uselessly.

Do you have any advice on the best way to achieve this kind of workflow “trigger” ?

Thanks a lot for your support.

The local file trigger is a feature of the OS - they are all on the same system.
So the local OS, tells a local program (n8n or anyone else) that there is a change to a directory.

A remote FTP has no “connection” to your machine, so the only way to do this is by polling - which is what you are doing.

1 Like

Ok thank you for this answer.

1 Like