Skip to main content
Version: 2.1

FTP / SFTP Integration Guide

Transfer files securely between MaestroHub and remote servers using the FTP/SFTP connector. This guide covers connection configuration, function setup, and pipeline integration for reliable file transfer workflows.

Overview

With the FTP/SFTP connector you gain:

  • Dual protocol support — FTP (plain or TLS-encrypted) and SFTP (SSH-based) through a unified interface
  • Complete file operations — Upload, download, list, and delete files on remote servers
  • Flexible authentication — Username/password for both protocols, SSH key authentication for SFTP
  • TLS/SSL encryption — Secure FTP connections with FTPS support
  • Passive mode — Firewall-friendly FTP connections for enterprise networks
  • Dynamic paths — Parameter templates for runtime-configurable file paths

Connection Configuration

Creating an FTP/SFTP Connection

Navigate to ConnectionsNew ConnectionFTP / SFTP and configure the following settings. The form is organized into tabs: Connection, Authentication, Advanced, Security, Functions, and Health.

1. Profile Information

FieldDefaultDescription
Profile NameA descriptive name for this connection profile (required, max 100 characters). Must be unique across all connections.
DescriptionOptional description for this FTP/SFTP connection

2. Connection Settings

FieldDefaultDescription
HostlocalhostFTP/SFTP server hostname or IP address (required)
Port21Server port — standard ports are 21 for FTP and 22 for SFTP (1–65,535)
ProtocolftpFile transfer protocol: FTP or SFTP (required)
Base Path/Default base directory on the remote server. All file operations use paths relative to this location.

3. Authentication Settings

FieldDefaultDescription
UsernameUsername for authentication. Leave empty for anonymous FTP access.
PasswordPassword for authentication (stored securely as a secret)
SSH Private KeyPEM-encoded SSH private key for SFTP key-based authentication (stored securely as a secret). Used instead of password when provided.
SFTP Authentication

For SFTP connections, you can authenticate using either a password or an SSH private key. Key-based authentication is recommended for automated systems and improved security.

4. Advanced Settings

FieldDefaultDescription
Passive ModetrueUse passive mode for FTP connections. Recommended for firewalled environments where active mode may be blocked.
Connection Timeout30Connection timeout in seconds (1–300). How long to wait when establishing a connection.

5. Security Settings

(FTP protocol only — SFTP inherently uses SSH encryption)

FieldDefaultDescription
Enable TLSfalseUse TLS/SSL encryption for FTP connections (FTPS). Provides encrypted data transfer over FTP.
Skip Certificate VerificationfalseSkip TLS certificate verification. Not recommended for production environments.

6. Health Check Configuration

Health check verifies the connection remains active and the server is reachable.

FieldDefaultDescription
Enable Health ChecktruePeriodically verify the connection is healthy
Check Interval (ms)30000How often to perform health checks (1,000–86,400,000 ms)
Retry Count1Number of retries for failed health checks (0–10)

7. Connection Labels

FieldDefaultDescription
LabelsKey-value pairs to categorize and organize this connection (max 10 labels)

Example Labels

  • environment: production — Deployment environment
  • purpose: data-export — Connection purpose
  • partner: acme-corp — External partner identifier
  • region: us-east — Geographic region
Protocol Selection Guide
  • FTP — Use for legacy systems, internal networks, or when SSH is not available. Enable TLS for encrypted transfers.
  • SFTP — Preferred for internet-facing connections. Provides built-in encryption via SSH. Supports key-based authentication for automation.

Function Builder

Creating FTP/SFTP Functions

After the connection is saved:

  1. Open the connection and navigate to the Functions tab
  2. Click New Function to open the function type selection dialog
  3. Choose from: Upload, Download, List, or Delete
  4. Fill in the Basic tab (name, description, labels) and the Configuration tab (paths, patterns)
  5. Use the Test button to validate the function against the live server

Each function has two configuration tabs:

  • Basic — Function name (required, max 100 characters, must be unique within the connection), optional description, and labels
  • Configuration — Function-specific parameters (remote paths, content, patterns)

Upload (ftp.upload)

Purpose: Upload file content to the remote FTP/SFTP server. Use this to export data, transfer reports, or deploy configuration files.

Configuration Fields

FieldTypeRequiredDefaultDescription
Remote PathStringYesDestination file path on the remote server. Supports ((placeholder)) syntax.
ContentStringYesFile content to upload. Supports ((placeholder)) syntax for dynamic content.
Create DirectoriesBooleanNotrueAutomatically create parent directories if they don't exist on the remote server.

Use Cases

  • Export CSV data to partner SFTP servers
  • Transfer log files to archive servers
  • Deploy configuration files to remote systems
  • Send report files to external stakeholders

Example Configuration

Remote Path: /uploads/reports/((date))/sales_report.csv
Content: ((csvData))
Create Directories: true

Download (ftp.download)

Purpose: Download file content from the remote FTP/SFTP server. Returns the file content as text or base64-encoded binary data.

Configuration Fields

FieldTypeRequiredDefaultDescription
Remote PathStringYesSource file path on the remote server. Supports ((placeholder)) syntax.

Use Cases

  • Fetch data files for processing in pipelines
  • Import CSV or Excel data from partner systems
  • Retrieve configuration files from remote servers
  • Download reports for analysis

Example Configuration

Remote Path: /data/exports/((fileName))

List (ftp.list)

Purpose: List files and directories on the remote FTP/SFTP server. Returns file metadata including names, sizes, modification times, and directory flags.

Configuration Fields

FieldTypeRequiredDefaultDescription
Remote PathStringNo/Directory path to list on the remote server. Supports ((placeholder)) syntax.
PatternStringNoGlob pattern to filter results (e.g., *.csv, report_*.txt). Leave empty to list all files.

Use Cases

  • Check for new files to process
  • Inventory remote directory contents
  • Monitor file availability before download
  • Find files matching specific patterns

Example Configuration

Remote Path: /incoming/data
Pattern: *.csv

Output Fields

FieldTypeDescription
namestringFile or directory name
sizenumberFile size in bytes
modifiedAtstringLast modification timestamp (ISO 8601)
isDirbooleantrue if the entry is a directory

Delete (ftp.delete)

Purpose: Delete a file on the remote FTP/SFTP server. Use this to clean up processed files or remove temporary data.

Configuration Fields

FieldTypeRequiredDefaultDescription
Remote PathStringYesFile path to delete on the remote server. Supports ((placeholder)) syntax.

Use Cases

  • Clean up files after successful processing
  • Remove temporary or staging files
  • Archive management workflows
  • Automated file rotation

Example Configuration

Remote Path: /incoming/processed/((fileName))

Using Parameters

Parameter placeholders ((parameterName)) can be used in path and content fields to make functions dynamic at execution time.

ConfigurationDescriptionExample
TypeValidate expected value typestring, number
RequiredForce critical inputsRequired / Optional
Default ValueProvide safe fallbacks/data, report.csv
DescriptionDocument purpose"Target filename for the export"

Testing Functions

Every FTP/SFTP function can be tested before saving using the built-in Test dialog:

  1. Click the Test button in the function form
  2. The dialog shows an Execution Overview with the current configuration
  3. Override any parameter values in the Test Parameters section
  4. Click Execute Test to run the function against the live server
  5. View the result in the integrated JSON viewer, including execution duration and timestamp

Pipeline Integration

Use FTP/SFTP connection functions as nodes in the Pipeline Designer to integrate file transfers into your automation workflows. The connector provides four node types:

NodeCategoryPurpose
FTP UploadStorageUpload files to remote servers
FTP DownloadStorageDownload files from remote servers
FTP ListStorageList files and directories
FTP DeleteStorageDelete files on remote servers

Drag the appropriate node into your pipeline, select your connection and function, bind parameters to upstream outputs or constants, and configure retry behavior as needed.

Common Use Cases

Partner Data Exchange

Transfer files to and from partner SFTP servers on a scheduled basis:

[Schedule Trigger] → [Transform Data] → [FTP Upload]

File-Based Data Import

Download and process incoming data files:

[FTP List] → [For Each] → [FTP Download] → [File Extractor] → [Process]

Automated Cleanup

Remove processed files after successful pipeline execution:

[Process File] → [FTP Delete] → [Log Success]

Report Distribution

Generate reports and distribute them to multiple destinations:

[Generate Report] → [FTP Upload (Partner A)] → [FTP Upload (Partner B)]

Troubleshooting

Connection Issues

SymptomPossible CauseSolution
Connection timeoutServer unreachableVerify hostname, port, and network connectivity. Check firewall rules.
Authentication failedInvalid credentialsVerify username and password. For SFTP, check SSH key format (must be PEM-encoded).
Connection refusedWrong portConfirm port (21 for FTP, 22 for SFTP). Check if server is running.
Passive mode errorFirewall blocking data channelTry disabling passive mode or configure firewall to allow FTP data ports.
TLS handshake failedCertificate issuesCheck server certificate validity. Use "Skip Certificate Verification" only for testing.

Function Issues

SymptomPossible CauseSolution
File not foundIncorrect pathVerify the file path exists. Check if base path is correctly configured.
Permission deniedInsufficient accessVerify the user has read/write permissions for the target directory.
Upload failedDirectory doesn't existEnable "Create Directories" option or ensure parent directories exist.
List returns emptyWrong patternCheck glob pattern syntax. Try listing without a pattern first.
Delete failedFile in use or lockedVerify the file is not being accessed by another process.

SFTP-Specific Issues

SymptomPossible CauseSolution
Invalid key formatWrong key encodingEnsure the SSH private key is PEM-encoded (begins with -----BEGIN).
Host key verification failedUnknown serverAdd the server's host key to known hosts or verify server identity.
Key passphrase requiredEncrypted keyUse an unencrypted private key or decrypt before adding to the connection.
Testing Connections

Use the Test Connection button after configuring your connection to verify connectivity before creating functions. The test validates authentication and basic server access.