Basic FTP icon

Basic FTP

Implement the operations from the "basic-ftp" library

Overview

The Basic FTP node's "Delete" operation allows you to delete a file from a remote FTP server. This is useful in workflows where you need to automate the removal of files after processing, clean up old data, or manage storage on an FTP server. For example, you might use this node to automatically delete log files after they have been downloaded and archived elsewhere.

Properties

Name Type Meaning
Path String The path to the file on the server that you want to delete (e.g., /path/to/remote/file.txt). This property is required for the Delete operation.

Output

  • The output is a JSON object reflecting the result of the deletion operation.
  • If the deletion is successful, the structure will be:
    {
      "json": { /* response from the FTP client, typically empty or success info */ }
    }
    
  • If an error occurs and "Continue On Fail" is enabled, the output will include:
    {
      "json": { "error": "Error message here" },
      "pairedItem": <index>
    }
    

Dependencies

  • External Service: Requires access to an FTP server.
  • Credentials: You must configure the basicFtpApi credentials in n8n, including host, port, username, password, and any TLS options if needed.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

  • Common Issues:

    • Invalid Path: If the specified path does not exist or is incorrect, the node will throw an error indicating the file could not be found or deleted.
    • Permission Denied: If the FTP user does not have permission to delete the file, an error will occur.
    • Connection Errors: Network issues or incorrect FTP credentials will prevent connection to the server.
  • Error Messages:

    • "The operation \"delete\" is not supported!" – This should not occur unless the node is misconfigured.
    • FTP errors such as "550 File not found" or "550 Permission denied" may be returned in the error field if "Continue On Fail" is enabled.

    How to resolve:

    • Double-check the file path and ensure it exists on the server.
    • Verify the FTP user's permissions.
    • Ensure network connectivity and correct credential configuration.

Links and References

Discussion