FTP/SFTP Integration
Superglue provides native support for FTP, FTPS (FTP over SSL/TLS), and SFTP (SSH File Transfer Protocol) servers, allowing you to manage files directly within your workflows without setting up a separate integration.Connection Protocols
FTP (File Transfer Protocol)
Standard unencrypted file transfer:FTPS (FTP Secure)
FTP over SSL/TLS for encrypted transfers:SFTP (SSH File Transfer Protocol)
Secure file transfer over SSH:Authentication Methods
1. Password Authentication
Include credentials in the connection URL:2. Using Variables
Use Superglue variables for secure credential management:3. SSH Key Authentication (SFTP only)
For SFTP connections with SSH keys, provide credentials separately:Supported Operations
All operations return JSON responses (files are not saved locally).1. List Directory Contents
List files and directories:2. Get File Content
Download and return file content:3. Upload Content
Upload data to a file:4. Delete File
Remove a file:5. Rename/Move File
Rename or move a file:6. Create Directory
Create a new directory:7. Remove Directory
Delete an empty directory:8. Check File Existence
Check if a file or directory exists:9. Get File Statistics
Get detailed file metadata:Workflow Examples
Example 1: Download and Process JSON Configuration
Example 2: Backup Files with Timestamp
Example 3: Process Multiple Files in Loop
Example 4: Upload Generated Report
Example 5: Clean Up Old Files
Common Patterns
1. Directory Synchronization
Check for new files and process them:2. JSON Data Exchange
Upload JSON data from previous steps:3. File Migration
Move files between directories:4. Conditional File Operations
Upload only if conditions are met:Error Handling
The FTP/SFTP integration includes automatic retry logic and detailed error messages:Common Errors and Solutions
-
“Missing ‘operation’ field in request body”
- Ensure your body includes an
operation
field
- Ensure your body includes an
-
“Unsupported operation: ‘download’”
- Use ‘get’ instead. Supported operations: list, get, put, delete, rename, mkdir, rmdir, exists, stat
-
“path required for get operation”
- The operation requires a
path
field in the body
- The operation requires a
-
“Connection refused”
- Verify the server address, port, and that the FTP/SFTP service is running
-
“Authentication failed”
- Check credentials and authentication method (password vs SSH key)
-
“No such file or directory”
- Verify the file path and that it exists on the server
Performance Considerations
- File Size Limits: Large files are loaded into memory; consider chunking for very large files
- Connection Reuse: Each operation creates a new connection
- Concurrent Operations: Use LOOP mode cautiously with many files
- Timeout Settings: Default timeout is 30 seconds, configurable via options
Security Best Practices
- Use SFTP or FTPS: Prefer encrypted protocols over plain FTP
- Secure Credentials: Never hardcode credentials; use Superglue variables
- SSH Keys: For SFTP, prefer SSH key authentication over passwords
- Validate Paths: Sanitize file paths to prevent directory traversal
- Limit Permissions: Use accounts with minimal required permissions
- Verify SSL Certificates: For production FTPS, enable certificate validation
Path Handling
Absolute vs Relative Paths
- Paths starting with
/
are absolute from the FTP root - Paths without
/
are relative to theurlPath
base directory - Use variables for dynamic paths:
"/data/<<folder>>/<<filename>>"
Path Variables
Integration with Other Steps
FTP/SFTP results integrate seamlessly with other workflow steps:Response Formats
File Listing
Returns an array of file/directory objects with metadataGet Operation
- JSON files: Parsed and returned as objects
- Text files: Returned as strings
- Binary files: Returned as base64-encoded strings
Other Operations
Return success status and relevant information about the operationLimitations
- No built-in support for recursive directory operations
- Files are processed in memory (consider size limitations)
- No streaming support for very large files
- Directory removal only works on empty directories