I have a task to redesign one of the legacy job - which checks for certain files name starting with XYZ* on a sftp server, need to check periodically, warn if file not gotten on that day, stop looking if already downloaded.
The workflow would get triggered by a Cron-Node.
Because there is no built-in functionality to list only files that start with a given string. So you would have to get all the files and then do the filtering of the files yourself. Either with an IF-Node or a Function-Node.
That result you can then use in another IF-Node which then either sends the message (Email, Slack, Mattermost, …) or does nothing.
That should be it.
As You suggested, used list operation in sftp, and used IF to check, workflow is crashing when I connected IF to FTP to download the matched file. I thought its crashing because of multiple files matched condition, tried with 1 file, same result. Any clues?
If you can see the result of the IF-Node then the FTP-Node will be the problem. How many entries are you sending into the FTP-Node? Are you just doing list or do you actually download the files?
Finally resolved issue. when I manually tried connecting to sftp, I got prompt to add host. after that it resolved issues. Weird is list worked fine without complaining.
Getting this error. First sftp with list command is success, and its always second sftp command failing. Do you think its not able to open another connection or is it trying to get hold of the same connection for second ftp…
I checked now. For me it is working fine when multiple FTP-Nodes get chained. Wonder what is different for you.
Every node is working by itself. Meaning it opens its own connection and closes it once it is done. So n8n should theoretically never use more than one FTP-connection at any given time.