File transfer remains the backbone of business data exchange. Despite APIs and cloud services, countless organizations still rely on FTP and SFTP servers for vendor data feeds, backup systems, and batch file processing.
The n8n FTP node bridges this gap. Automate file transfers without writing scripts or managing cron jobs.
Need to pull daily reports from a supplier? Upload processed files to a client server? Sync data between systems? The FTP node handles it within your visual workflows, supporting both FTP and SFTP protocols.
The File Transfer Automation Challenge
Automating FTP operations sounds simple until you hit the edge cases:
- Binary files need special handling
- Paths behave differently across servers
- Timeouts occur without clear error messages
- No native FTP trigger means creative solutions for detecting new files
This guide addresses all of these challenges with practical solutions drawn from real n8n community discussions.
What Youâll Learn
- How to choose between FTP and SFTP credentials for your use case
- Configuring all five FTP operations: List, Download, Upload, Delete, and Rename
- Working with binary data and connecting to file processing workflows
- Building automation patterns without a native FTP trigger
- Troubleshooting timeout, permission, and connection errors
- Security best practices for production file transfers
- Real-world examples you can adapt immediately
When to Use the FTP Node
Before reaching for the FTP node, confirm it fits your use case. Some scenarios have better alternatives within n8n.
| Scenario | Best Solution | Why |
|---|---|---|
| Download file from web URL | HTTP Request node | Purpose-built for HTTP downloads |
| Upload to Google Drive or S3 | Dedicated cloud storage nodes | Native authentication and features |
| Read local files on n8n host | Read/Write Files from Disk node | Direct filesystem access |
| Transfer to remote FTP server | FTP node | Designed for FTP/SFTP protocols |
| Sync with legacy vendor system | FTP node | Legacy systems often only support FTP |
| Automated backup to FTP server | FTP node | Reliable for scheduled file uploads |
| Process files from supplier | FTP node + processing nodes | Complete workflow automation |
Rule of thumb: Use the FTP node when the remote system specifically requires FTP or SFTP protocol. For HTTP-based file downloads, cloud storage, or local files, other nodes provide simpler solutions.
FTP Node vs HTTP Request for Files
New users sometimes confuse these nodes for file operations:
- FTP node: Connects to FTP/SFTP servers using the file transfer protocol
- HTTP Request node: Downloads files via HTTP/HTTPS URLs
If your file is accessible via a web URL (starting with http:// or https://), use HTTP Request. If you need to connect to a server with FTP credentials and navigate directories, use the FTP node.
Understanding FTP and SFTP Protocols
Before configuring credentials, understand the key differences between these protocols.
FTP (File Transfer Protocol)
FTP is the original file transfer protocol dating back to 1971. It transfers files over TCP, typically on port 21.
Characteristics:
- Sends credentials and data in plain text
- Widely supported by legacy systems
- Simple to configure
- No built-in encryption
Security concern: FTP credentials travel unencrypted over the network. Anyone monitoring network traffic can capture usernames and passwords. Only use FTP on trusted networks or when no alternative exists.
SFTP (SSH File Transfer Protocol)
SFTP runs over SSH, typically on port 22. Despite the similar name, it is completely different from FTP.
Characteristics:
- All data and credentials are encrypted
- Supports key-based authentication
- Single connection (no separate data channel)
- Modern security standards
Recommendation: Always prefer SFTP when the server supports it. The encryption protects credentials and file contents during transfer.
FTPS (Not Supported)
n8n currently does not support FTPS (FTP over TLS/SSL). If your server requires FTPS specifically, you may need to use the Execute Command node with a command-line FTP client, or request this feature from n8n.
Passive vs Active FTP Mode
FTP uses two channels: a control channel for commands and a data channel for file transfers. How the data channel is established determines whether FTP operates in active or passive mode.
Active mode: The server initiates the data connection back to the client. This often fails when the client is behind a firewall or NAT because incoming connections are blocked.
Passive mode: The client initiates both connections. This works better with firewalls because all connections are outbound from the clientâs perspective.
The n8n FTP node uses passive mode by default, which is the correct choice for most environments. If you experience connection issues where authentication succeeds but file operations hang or timeout, the server may not support passive mode properly. In such cases:
- Verify the FTP serverâs passive port range is accessible
- Check if a firewall is blocking the passive data ports (typically 1024-65535)
- Contact the server administrator to confirm passive mode configuration
SFTP avoids this complexity entirely by using a single encrypted connection for both commands and data. This is another reason to prefer SFTP when available.
Protocol Comparison
| Aspect | FTP | SFTP |
|---|---|---|
| Default port | 21 | 22 |
| Encryption | None | Full (SSH) |
| Authentication | Username/password | Username/password or SSH keys |
| Firewall complexity | High (multiple ports) | Low (single port) |
| Connection mode | Active or Passive | Single channel |
| n8n support | Yes | Yes |
| Recommended | Legacy only | Yes |
Setting Up FTP Credentials
The FTP node requires credentials to authenticate with the remote server. n8n provides separate credential types for FTP and SFTP.
FTP Credentials
Use this credential type for standard FTP connections without SSH.
- Go to Credentials in n8n
- Click Add Credential
- Search for and select FTP
- Configure the following:
| Field | Description | Example |
|---|---|---|
| Host | Server hostname or IP | ftp.example.com |
| Port | FTP port (default 21) | 21 |
| Username | FTP account username | ftpuser |
| Password | FTP account password | secretpassword |
SFTP Credentials
Use this credential type for secure SSH-based file transfers.
- Go to Credentials in n8n
- Click Add Credential
- Search for and select SFTP
- Configure authentication method:
Password Authentication:
| Field | Description | Example |
|---|---|---|
| Host | Server hostname or IP | sftp.example.com |
| Port | SSH port (default 22) | 22 |
| Username | SSH account username | sftpuser |
| Password | SSH account password | secretpassword |
Private Key Authentication:
For enhanced security, use SSH key pairs instead of passwords.
| Field | Description |
|---|---|
| Host | Server hostname or IP |
| Port | SSH port (default 22) |
| Username | SSH account username |
| Private Key | Your private key in OpenSSH format |
| Passphrase | Key passphrase (if encrypted) |
The private key must be in OpenSSH format. Keys generated with ssh-keygen -o work correctly. If you have a PuTTY .ppk file, convert it first using PuTTYgen.
Example private key format:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtz
c2gtZWQyNTUxOQAAACBIvRqgM4...
-----END OPENSSH PRIVATE KEY-----
Testing Credentials
After configuring credentials, test them before using in workflows:
- Create a new workflow
- Add the FTP node
- Select your credentials
- Set Operation to List
- Enter a known path (like
/or/home) - Click Test step
If the connection fails, check the error message for clues about hostname resolution, authentication, or network connectivity.
For credential management best practices, see our n8n credential management guide.
Your First FTP Operation
Letâs walk through basic FTP operations step by step.
Step 1: Add the FTP Node
- Open your n8n workflow
- Click + to add a node
- Search for FTP
- Click to add it
Step 2: Configure a List Operation
The List operation shows files and folders on the remote server. It is useful for discovering what files are available before downloading.
- Select your FTP or SFTP credentials
- Set Protocol to match your credential type
- Set Operation to List
- Enter the Path to list (e.g.,
/uploadsor/home/user/reports) - Click Test step
Step 3: Read the Response
The List operation returns an array of file and folder information:
[
{
"type": "file",
"name": "report_2024.csv",
"size": 15234,
"modifyTime": 1703500800000,
"accessTime": 1703504400000
},
{
"type": "directory",
"name": "archive",
"size": 4096,
"modifyTime": 1703414400000,
"accessTime": 1703500800000
}
]
You can now filter or loop through these results to process specific files.
Step 4: Download a File
To download a file you discovered:
- Add another FTP node
- Set Operation to Download
- Enter the full Path including filename (e.g.,
/uploads/report_2024.csv) - Click Test step
The file downloads as binary data attached to the output item. You can view it in the Binary tab of the node output.
All FTP Operations Explained
The FTP node supports five operations. Each has specific configuration options and use cases.
List: View Directory Contents
Lists files and folders at a specified path.
Parameters:
| Parameter | Description | Required |
|---|---|---|
| Path | Remote directory path | Yes |
| Recursive | Include subdirectories | No |
Recursive option: When enabled, the node traverses subdirectories and returns all files in the tree. Use with caution on directories with many files.
Output structure:
// Each item contains:
{
type: "file" | "directory",
name: "filename.ext",
size: 12345, // bytes
modifyTime: 1703500800000, // timestamp
accessTime: 1703504400000 // timestamp
}
Common pattern: List files, then use a Loop node to process each file individually.
Download: Retrieve Files
Downloads a file from the remote server to n8n as binary data.
Parameters:
| Parameter | Description | Required |
|---|---|---|
| Path | Full path including filename | Yes |
Output: The file becomes available as binary data attached to the output item. The binary property name defaults to data.
Accessing downloaded files:
After downloading, the binary data is available for:
- Passing to other nodes (email attachments, cloud storage upload)
- Writing to local disk with Read/Write Files from Disk node
- Processing with Extract from File node
For detailed binary data handling, see our n8n binary data guide.
Upload: Send Files to Server
Uploads a file to the remote server.
Parameters:
| Parameter | Description | Required |
|---|---|---|
| Path | Destination path including filename | Yes |
| Binary File | Upload binary data (on) or text content (off) | Yes |
| Input Binary Field | Name of binary property to upload | When binary |
Binary upload example:
When uploading a file from a previous node:
- Enable Binary File
- Set Input Binary Field to the property name (usually
data) - Set Path to the destination like
/uploads/myfile.csv
Text content upload:
When uploading text directly:
- Disable Binary File
- Enter the text content or use an expression
- The file is created with that text content
Creating the binary data:
Before uploading, you need binary data from somewhere:
- HTTP Request node downloading a file
- Convert to File node creating a file from data
- Read/Write Files from Disk node reading a local file
- Previous FTP Download operation
Delete: Remove Files and Folders
Deletes files or folders from the remote server.
Parameters:
| Parameter | Description | Required |
|---|---|---|
| Path | Path to delete | Yes |
| Folder | Enable to delete folders | No |
| Recursive | Delete folder contents recursively | When folder enabled |
Safety warning: Delete operations are irreversible. Always test on non-production servers first, and consider implementing a confirmation step or archiving before deletion.
Folder deletion:
To delete a folder, you must enable both Folder and Recursive options. The node refuses to delete non-empty folders without recursive mode.
Rename: Move and Rename Files
Renames or moves files and folders.
Parameters:
| Parameter | Description | Required |
|---|---|---|
| Old Path | Current file location | Yes |
| New Path | Destination path | Yes |
| Create Directories | Create missing parent directories | No |
Moving files:
The Rename operation doubles as a move operation. To move a file to a different directory, specify the full destination path:
Old Path: /incoming/report.csv
New Path: /processed/2024/01/report.csv
Create Directories option:
When enabled, the node creates any missing directories in the destination path. This is useful for organizing files into date-based folder structures.
Creating Folders (Workaround)
The FTP node lacks a dedicated âCreate Folderâ operation, but you can create directories using two workarounds.
Method 1: Create via Rename with Create Directories
If you have any file to move or rename, enable âCreate Directoriesâ and specify the new folder path:
- Add FTP node with Rename operation
- Set Old Path to an existing file
- Set New Path to
/new/folder/path/filename.txt - Enable Create Directories
The entire folder structure is created automatically.
Method 2: Upload and Delete Placeholder
To create an empty folder structure without moving existing files:
-
FTP (Upload) - Upload a small placeholder file:
- Path:
/new/folder/structure/.placeholder - Binary File: Off
- Content:
temp
- Path:
-
FTP (Delete) - Remove the placeholder:
- Path:
/new/folder/structure/.placeholder
- Path:
This leaves the folder structure in place. Here is the workflow pattern:
// First node: Upload placeholder
{
"operation": "upload",
"path": "/clients/{{ $json.clientId }}/documents/.placeholder",
"binaryFile": false,
"content": "temp"
}
// Second node: Delete placeholder
{
"operation": "delete",
"path": "/clients/{{ $json.clientId }}/documents/.placeholder"
}
Use this pattern when you need to prepare folder structures before files arrive.
Working with Binary Data
Understanding binary data flow is essential for FTP automations. Files in n8n travel as binary data attached to items.
How Binary Data Works
When you download a file via FTP, n8n stores it as a binary attachment rather than in the JSON data. Access it through the Binary tab in node outputs.
Binary property structure:
{
"json": {
// Regular data
},
"binary": {
"data": {
"fileName": "report.csv",
"fileExtension": "csv",
"mimeType": "text/csv",
"data": "base64encodedcontent..."
}
}
}
The default property name is data, but nodes can use different names. Always check the binary output to confirm the property name.
Connecting to File Processing
A typical pattern downloads files, processes them, and re-uploads:
- FTP (Download) - Retrieves the file
- Extract from File - Parses CSV/Excel content
- Processing nodes - Transform the data
- Convert to File - Creates output file
- FTP (Upload) - Sends processed file back
Download Then Upload Pattern
To download from one server and upload to another:
- First FTP node downloads file (binary data in
dataproperty) - Second FTP node uploads with Input Binary Field set to
data
The binary data flows directly between nodes without needing intermediate storage.
Dynamic Paths and Filenames
Static paths work for simple cases, but real automations often need dynamic paths based on dates, IDs, or data from previous nodes.
Using Expressions for Paths
The Path field accepts n8n expressions. Reference data from previous nodes:
// Use filename from previous node
/uploads/{{ $json.fileName }}
// Use ID from webhook data
/customers/{{ $('Webhook').item.json.customerId }}/reports/
// Combine multiple fields
/data/{{ $json.region }}/{{ $json.productType }}/export.csv
Date-Based Folder Structures
Organize files by date using n8nâs date functions:
// Year/Month/Day structure
/archives/{{ $now.format('yyyy') }}/{{ $now.format('MM') }}/{{ $now.format('dd') }}/
// ISO date in filename
/reports/daily_report_{{ $now.format('yyyy-MM-dd') }}.csv
// Month name folder
/monthly/{{ $now.format('MMMM') }}/report.xlsx
Handling Special Characters
File paths with spaces or special characters need careful handling:
// Spaces in paths generally work
/My Documents/Reports/file.csv
// Avoid these characters in paths
< > : " | ? * \
If incoming data might contain problematic characters, sanitize it first in a Code node:
const safeName = $json.fileName.replace(/[<>:"|?*\\]/g, '_');
return [{ json: { safeName } }];
Automation Patterns
The FTP node lacks a native trigger, meaning it cannot automatically start workflows when files appear. Here are patterns to work around this limitation.
Pattern 1: Poll for New Files
Use a Schedule Trigger to periodically check for new files:
- Schedule Trigger - Runs every 5 minutes (or your preferred interval)
- FTP (List) - Gets current files in the target directory
- Code node - Compare against previously seen files (stored in database or static data)
- IF node - Branch if new files exist
- FTP (Download) - Download new files
- Processing nodes - Handle the files
- FTP (Rename) - Move processed files to archive folder
Key considerations:
- Store processed filenames to avoid reprocessing
- Move processed files to prevent duplicate handling
- Set reasonable poll intervals to avoid server overload
Pattern 2: Download, Process, Re-upload
A common integration pattern:
- Schedule Trigger - Daily at 6 AM
- FTP (Download) - Get supplier data file
- Extract from File - Parse CSV content
- Transform nodes - Clean and enrich data
- Convert to File - Create output format
- FTP (Upload) - Send to destination server
- FTP (Rename) - Archive source file
Pattern 3: FTP to Cloud Storage Sync
Migrate files from legacy FTP to modern cloud storage:
- Schedule Trigger - Every hour
- FTP (List) - Check for new files
- Filter node - Only unprocessed files
- FTP (Download) - Retrieve files
- Google Drive / S3 node - Upload to cloud
- FTP (Delete or Rename) - Clean up source
Pattern 4: Webhook-Triggered File Processing
When an external event signals file readiness:
- Webhook node - Receives notification that file is ready
- FTP (Download) - Retrieve the specified file
- Processing nodes - Transform data
- HTTP Request - Send results to API
- FTP (Delete) - Remove processed file
This pattern avoids polling by using webhooks to trigger on-demand.
Error Handling and Troubleshooting
FTP operations can fail for many reasons. Here is how to diagnose and handle common issues.
Common Error Reference
| Error | Likely Cause | Solution |
|---|---|---|
| Connection refused | Wrong host/port, firewall | Verify server address and port, check firewall rules |
| Authentication failed | Wrong credentials | Double-check username and password |
| Permission denied | Insufficient file permissions | Contact server admin for access |
| No such file | Path does not exist | Verify path, check for typos, use List first |
| Connection timeout | Network issues, server overload | Increase timeout, try during off-peak hours |
| ENOTFOUND | DNS resolution failed | Check hostname spelling, try IP address |
| Directory not empty | Trying to delete non-empty folder | Enable recursive delete option |
| Auth succeeds but hangs | Passive mode port blocked | Check firewall allows passive ports (1024-65535) |
| ECONNRESET during transfer | Connection dropped mid-transfer | Increase timeout, check network stability |
Timeout Issues
FTP operations can timeout on:
- Large file transfers
- Slow network connections
- Overloaded servers
Solutions:
- Increase node timeout: In node settings, increase the timeout value
- Check network: Test connection speed to the FTP server
- Off-peak scheduling: Run large transfers during low-traffic periods
- Chunk large files: Split very large files into smaller pieces
For comprehensive timeout troubleshooting, see our fixing n8n timeout errors guide.
Retry Configuration
Enable automatic retries for transient failures:
- Open the FTP node settings
- Enable Retry On Fail
- Set Max Tries (e.g., 3)
- Set Wait Between Tries in milliseconds (e.g., 5000)
This handles temporary network glitches and brief server unavailability automatically.
Error Trigger Workflow
For critical FTP automations, set up error monitoring:
- Create a separate workflow with an Error Trigger node
- Configure it to run when your FTP workflow fails
- Send notifications via email, Slack, or SMS
This ensures you learn about failures quickly rather than discovering missing data later.
For debugging complex workflows, try our free workflow debugger tool.
Real-World Examples
These examples demonstrate practical FTP automation patterns you can adapt.
Example 1: Daily Report Download and Email
Scenario: Download a daily sales report from a supplier FTP and email it to the team.
Workflow:
- Schedule Trigger - 7:00 AM daily
- FTP (Download) - Path:
/reports/sales_{{ $now.minus(1, 'day').format('yyyyMMdd') }}.csv - Send Email node - Attach the binary data, send to distribution list
FTP Configuration:
Protocol: SFTP
Operation: Download
Path: /reports/sales_{{ $now.minus(1, 'day').format('yyyyMMdd') }}.csv
The expression grabs yesterdayâs report, accounting for the typical delay in report generation.
Example 2: Website Backup to FTP
Scenario: Backup website files to a remote FTP server weekly.
Workflow:
- Schedule Trigger - Sunday 2:00 AM
- Execute Command - Create compressed archive:
tar -czf /tmp/backup.tar.gz /var/www/html - Read Binary File - Load the archive
- FTP (Upload) - Path:
/backups/website_{{ $now.format('yyyy-MM-dd') }}.tar.gz - FTP (List) - List backup directory
- Code node - Find backups older than 30 days
- FTP (Delete) - Remove old backups
This creates rolling backups with automatic cleanup.
Example 3: Order File Processing from Supplier
Scenario: Process order files that arrive on a supplier FTP server.
Workflow:
- Schedule Trigger - Every 15 minutes
- FTP (List) - Path:
/incoming - Filter - Only
.csvfiles not starting withprocessed_ - Loop Over Items - Process each file
- FTP (Download) - Get the file
- Extract from File - Parse CSV
- HTTP Request - POST orders to your API
- FTP (Rename) - Move to
/incoming/processed_{{ $json.name }}
The rename step prevents reprocessing by prefixing completed files.
Example 4: Multi-File Upload from Form
Scenario: Accept file uploads via web form and transfer to client FTP.
Workflow:
- Webhook - Receives form submission with files
- Split Out - Handle each uploaded file separately
- FTP (Upload) - Path:
/uploads/{{ $json.clientId }}/{{ $json.fileName }}
Webhook configuration:
HTTP Method: POST
Response Mode: When Last Node Finishes
Binary Property: files
This handles variable numbers of uploaded files, organizing them by client ID.
Security Best Practices
File transfers often contain sensitive data. Follow these practices to protect your automations.
Always Prefer SFTP
FTP transmits credentials and data without encryption. Anyone on the network path can intercept:
- Your username and password
- File contents
- Directory listings
SFTP encrypts everything. Unless the remote server only supports FTP, always use SFTP credentials.
Use SSH Keys Over Passwords
SSH key authentication is more secure than passwords:
- Keys cannot be guessed or brute-forced easily
- Keys can be rotated without updating n8n
- Compromised keys can be revoked individually
Generate a dedicated key pair for n8n rather than reusing personal keys.
Principle of Least Privilege
Request minimal FTP permissions:
- Read-only access if you only download
- Write access limited to specific directories
- No delete permissions unless absolutely required
This limits damage if credentials are compromised.
Secure Credential Storage
n8n encrypts credentials at rest, but additional precautions help:
- Use unique credentials per workflow purpose
- Rotate credentials periodically
- Remove unused credentials
- Limit who can access credential management
For more security guidance, see our n8n self-hosting security guide.
Firewall and IP Whitelisting
If your FTP server supports it, whitelist the IP address of your n8n instance. This prevents unauthorized connection attempts even if credentials leak.
For self-hosted n8n, use a static IP or document your serverâs address for firewall rules.
Pro Tips and Best Practices
1. Check Before Downloading
Before downloading, verify the file exists to avoid errors:
- Use List operation with the parent directory
- Filter results for your target filename
- Only proceed if found
This prevents cryptic errors when expected files are missing.
2. Use Temporary Filenames During Upload
Uploading directly to the final filename risks partial file visibility:
# Bad: Other systems might see incomplete file
/data/report.csv
# Better: Upload to temp, then rename
/data/.tmp_report.csv â /data/report.csv
Use two FTP operations: Upload to a hidden/temp name, then Rename to the final name.
3. Implement Logging
Add Set nodes after critical operations to log activity:
{
"timestamp": "{{ $now }}",
"operation": "download",
"file": "{{ $json.path }}",
"status": "success"
}
Send logs to a database or logging service for troubleshooting and audit trails.
4. Handle Empty Directories
List operations on empty directories return empty arrays. Check for this:
// In an IF node condition
{{ $json.length > 0 }}
Route empty results to a different path to avoid errors in downstream processing.
5. Archive Instead of Delete
Rather than deleting processed files, move them to an archive folder:
/incoming/file.csv â /archive/2024/01/file.csv
This preserves files for debugging and audit purposes while keeping the incoming folder clean.
6. Monitor Transfer Health
Set up regular health checks:
- Track successful/failed transfer counts
- Alert on consecutive failures
- Monitor file sizes for anomalies
- Log transfer durations to detect slowdowns
For help implementing robust file transfer workflows, explore our workflow development services or consulting packages.
Frequently Asked Questions
How do I check for new files on an FTP server without a trigger?
n8n lacks a native FTP trigger, so you must implement polling:
- Use a Schedule Trigger at regular intervals (every 5 minutes, hourly)
- List the target directory
- Compare results against previously processed files
- Download and process only new files
Track processed files by:
- Storing filenames in a database or n8n static data
- Moving completed files to an archive folder
- Renaming with a prefix like
processed_
The key is having a reliable way to identify new files versus already-handled ones.
Why is my FTP upload timing out?
Common causes:
- Large file sizes exceeding timeout limits
- Slow network connections
- Server-side upload restrictions
- Passive mode port blocking (see Protocol section above)
Troubleshooting steps:
- Test with a small file first to isolate size-related issues
- Increase the node timeout in settings
- Check server upload size limits
- Compress files before upload
- Schedule transfers during off-peak hours
If uploads work manually via FileZilla but fail in n8n, check for network restrictions or proxy configurations on your n8n instance.
How do I use data from previous nodes to set the filename?
Use n8n expressions in the Path field:
// From current item
/uploads/{{ $json.customerId }}_{{ $json.reportName }}.csv
// From specific node
/reports/{{ $('Webhook').item.json.orderId }}.pdf
// Date-based naming
/daily/report_{{ $now.format('yyyy-MM-dd') }}.csv
Important: Sanitize values that might contain invalid path characters. Use a Code node if needed:
const safeName = $json.fileName.replace(/[<>:"|?*\\]/g, '_');
Can I create folders on the FTP server?
The FTP node lacks a dedicated âCreate Folderâ operation. Use these workarounds:
Method 1: Rename with Create Directories
- Use the Rename operation
- Enable âCreate Directoriesâ option
- The destination path folders are created automatically
Method 2: Placeholder file technique
- Upload a tiny placeholder file to
/new/folder/.placeholder - Delete the placeholder immediately
- The folder structure remains
See the âCreating Folders (Workaround)â section for detailed code examples.
What is the difference between FTP and SFTP in n8n?
Despite similar names, these are completely different protocols:
| Aspect | FTP | SFTP |
|---|---|---|
| Encryption | None (plain text) | Full (SSH tunnel) |
| Default port | 21 | 22 |
| Auth methods | Password only | Password or SSH keys |
| Security | Insecure | Secure |
In n8n:
- Select the Protocol matching your credential type
- SFTP credentials support private key authentication
- Always prefer SFTP when available
Note: FTPS (FTP over TLS) is a third protocol that n8n does not currently support.