Back to Integrations
Action

SFTP

The SFTP node securely connects to remote servers via SSH File Transfer Protocol. It enables automated workflows to transfer files safely, utilizing streaming memory protection and explicit connection pooling.

SFTP
File Transfer / Action
⚠️

What can you do with SFTP?

Full Remote Management

Natively perform Delete, Create Folder (Mkdir), and Rename operations on your remote server without writing custom SSH commands.

Built-In OOM Protection

Downloads are securely capped at 50MB and stream directly via LimitReader to prevent engine Out-Of-Memory crashes when handling large files.

Binary Data Ready

Seamlessly integrates with nLink's native binary format by encoding downloads into Base64 and setting the `_isBinary` flag automatically.

Secure File Transfer

Supports both password and encrypted private-key authentication, guaranteeing enterprise-grade security for file exchanges over the network.

Detailed Usage & Configuration

The SFTP node is essential for automating data synchronization between your nLink workflows and legacy FTP/SFTP servers. You can list directories, pull down latest reports, or upload generated files seamlessly.

1. Connection Configuration

Never hardcode your server credentials! The SFTP node natively integrates with nLink's encrypted Credential Vault. First, select or create an SFTP Auth credential. You can authenticate using a standard password or a highly secure SSH Private Key (PEM format) with an optional passphrase. All credentials are encrypted at rest.

2. Memory Safe Downloads

If you select the Download File action, the node reads the file from the remote path. To protect the workflow engine, this node enforces a hard limit of 50MB per file. The output payload will look like this:

[
  {
    "json": {
      "filename": "monthly_report.pdf",
      "size": 150342,
      "data": "JVBERi0xLjQKJcOkw7zDtsOfCjIg...",
      "_isBinary": true
    }
  }
]

This payload is fully compatible with any downstream node that accepts Base64 binary files.

3. Uploading Files

To use the Upload File action, you must provide the Remote Path (e.g., /var/www/uploads/file.png) and the File Content (Base64). If you downloaded a file from another node, you can dynamically map its Base64 data (e.g., {{ $json.data }}) into the upload field.

4. File System Management

The SFTP node provides comprehensive tools to maintain your remote directories organically:

  • Create Folder (Mkdir): Dynamically generate new directories (e.g., /reports/2026/05) before uploading files into them.
  • Rename: Provide a New Remote Path to instantly rename or move files across the server.
  • Delete File/Folder: Clean up processed files automatically. The node intelligently detects if the path is a file or an empty directory and executes the proper removal command securely.
🔒 Resource Leak Prevention: This Node manages its File Descriptors strictly. SSH and SFTP connections are opened and securely closed automatically during execution, preventing standard "Too many open files" errors on high-volume workflows.