Basic FTP icon

Basic FTP

Implement the operations from the "basic-ftp" library

Overview

The Basic FTP node's "Upload" operation allows you to upload a file from n8n to a remote FTP server. This is useful for automating the transfer of files—such as reports, images, or backups—from your workflows directly to an FTP location. Common scenarios include:

  • Uploading generated documents to a partner's FTP server.
  • Backing up data files to a remote server.
  • Automating the delivery of exports or logs.

Example:
After generating a PDF report in your workflow, use this node to upload the PDF to a specified folder on your company's FTP server.

Properties

Name Type Meaning
Binary Property String The name of the binary property in the input item that contains the file data to upload.
Path String The destination path (including filename) on the FTP server where the file will be saved.

Output

  • The output is a JSON object containing the result of the upload operation as returned by the FTP client library.
  • No additional fields are added unless the FTP library returns them.
  • No binary data is output for the upload operation; only the status/result of the upload is provided.

Example output:

{
  "json": {
    // Response from the FTP server after uploading the file
  }
}

Dependencies

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

Troubleshooting

Common Issues:

  • Invalid Credentials: If the FTP login fails, check your username, password, and host details.
  • Path Errors: If the specified "Path" does not exist or is invalid, the upload will fail. Ensure the directory exists and you have write permissions.
  • Binary Property Not Found: If the specified "Binary Property" does not exist in the input item, the node will throw an error. Make sure the property name matches exactly.
  • Connection Issues: Network problems or incorrect port/security settings can prevent connection to the FTP server.

Error Messages:

  • The operation "upload" is not supported! – This should not occur unless the node is misconfigured.
  • Errors related to missing binary data or failed uploads will be included in the output if "Continue On Fail" is enabled, otherwise they will stop the workflow.

Links and References

Discussion