{"library":"node-red-contrib-ftp","title":"Node-RED FTP/SFTP Client","description":"node-red-contrib-ftp is a Node-RED package providing nodes for interacting with FTP and SFTP servers. It enables Node-RED flows to perform various file operations such as listing, getting, putting, appending, deleting, and creating directories on remote servers. The package includes an 'ftp in' node for standard FTP operations and an 'sftp in' node for secure file transfer via SFTP. As of version 0.0.8, it integrates directly into the Node-RED editor palette, offering a visual way to manage file transfers. Node-RED contrib packages typically follow the Node-RED release cycle, but individual package updates vary. Key differentiators include its tight integration with Node-RED's flow-based programming model, allowing for easy automation of file transfer tasks within larger workflows without writing custom code.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install node-red-contrib-ftp"],"cli":null},"imports":["Install via `npm install node-red-contrib-ftp` in your Node-RED user directory, then drag the 'ftp in' node from the Node-RED palette into your flow.","Install via `npm install node-red-contrib-ftp` in your Node-RED user directory, then drag the 'sftp in' node from the Node-RED palette into your flow.","Configure a shared 'ftp' configuration node (accessible via 'Add new ftp config...' when editing an 'ftp in' node) to define connection parameters (host, port, user, password) for multiple FTP operations."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"[{\"id\":\"91039113.5ae0b8\",\"type\":\"debug\",\"z\":\"e052b363.bcca48\",\"name\":\"Output Debug\",\"active\":true,\"console\":\"false\",\"complete\":\"payload\",\"x\":494,\"y\":72,\"wires\":[]},{\"id\":\"ebf6cb8.83c77b8\",\"type\":\"inject\",\"z\":\"e052b363.bcca48\",\"name\":\"Trigger Delete\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"none\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"x\":114,\"y\":141,\"wires\":[[\"18704d55.fa8d63\"]]},{\"id\":\"18704d55.fa8d63\",\"type\":\"function\",\"z\":\"e052b363.bcca48\",\"name\":\"Set Filename for Delete\",\"func\":\"msg.filename = 'test.csv';\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":270,\"y\":141,\"wires\":[[\"6f4f3dda.a20a7c\"]]},{\"id\":\"6f4f3dda.a20a7c\",\"type\":\"ftp in\",\"z\":\"e052b363.bcca48\",\"ftp\":\"a7676b1a.e9714\",\"operation\":\"delete\",\"filename\":\"\",\"localFilename\":\"\",\"name\":\"Delete Remote File\",\"x\":440,\"y\":143,\"wires\":[[\"be82074.47a8878\"]]},{\"id\":\"8e30f382.5971f8\",\"type\":\"inject\",\"z\":\"e052b363.bcca48\",\"name\":\"Trigger List\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"none\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"x\":108,\"y\":67,\"wires\":[[\"be82074.47a8878\"]]},{\"id\":\"be82074.47a8878\",\"type\":\"ftp in\",\"z\":\"e052b363.bcca48\",\"ftp\":\"a7676b1a.e9714\",\"operation\":\"list\",\"filename\":\"\",\"localFilename\":\"\",\"name\":\"List Remote Files\",\"x\":276,\"y\":68,\"wires\":[[\"91039113.5ae0b8\"]]},{\"id\":\"a7676b1a.e9714\",\"type\":\"ftp\",\"z\":\"\",\"host\":\"${process.env.FTP_HOST ?? 'YOUR_FTP_HOST'}\",\"port\":\"21\",\"secureOptions\":\"\",\"user\":\"${process.env.FTP_USERNAME ?? 'YOUR_USERNAME'}\",\"connTimeout\":\"\",\"pasvTimeout\":\"\",\"keepalive\":\"\"}]","lang":"json","description":"This Node-RED flow demonstrates how to use the 'ftp in' node to first list files on a remote FTP server, then delete a specific file named 'test.csv', and finally list the files again to confirm the deletion. It uses inject nodes to trigger the operations and a debug node to display the results. Replace placeholder FTP host and credentials in the 'ftp' config node with your own details, ideally using environment variables.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}