Connect
Connects to a remote FTP server
Common Properties
Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
if ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.
Input
- Host - FTP server host address
- Port - FTP server port number
Output
- Session id - FTP session id
Options
- FTP Type - Check whether it is FTP, sFTP or FTPS server.
- Login Credentials - Username and Password credentials from a Vault.
- Skip TLS Verification - Ignore SSL verifications that prevent a connection.
How It Works
The Connect node establishes a connection to a remote FTP server and creates a session that can be used by other FTP nodes:
- Credential Validation: Retrieves username and password from the specified Vault
- Session Creation: Creates a new session based on the selected FTP type (FTP, FTPS, or SFTP)
- Connection Establishment: Connects to the server using the provided host and port
- Authentication: Logs in using the credentials and any additional security parameters
- Session ID Generation: Returns a unique session ID for use with subsequent FTP operations
Requirements
- Valid FTP server hostname or IP address
- Port number (default: 21 for FTP, 990 for FTPS, 22 for SFTP)
- Login credentials stored in a Robomotion Vault
- Network connectivity to the FTP server
- For SFTP: SSH access enabled on the server
- For FTPS: TLS/SSL support on the server
Error Handling
| Error Code | Description | Cause |
|---|---|---|
| Core.FTP.Connect.ErrOnCreate | Config parse error | Node configuration is malformed |
| Core.FTP.Connect.OnMessage | Message parse error | Input message cannot be parsed |
| Core.FTP.Connect.ErrCredentials | Invalid credentials | Credentials cannot be retrieved from vault or decoded |
| Core.FTP.Connect.OnMessage | Vault has to be selected | No vault selected in configuration |
| Core.FTP.Connect.OnMessage | Vault item has to be selected | No vault item selected in configuration |
| Core.FTP.Connect.ErrUsername | Username can not be empty | Username is missing in vault credentials |
| Core.FTP.Connect.ErrHost | Host can not be empty | Host field is empty |
| Core.FTP.Connect.ErrPort | Port can not be empty | Port field is empty or zero |
| Core.FTP.Connect.ErrFtpType | Unknown ftp type | Invalid FTP type specified |
| Core.FTP.Connect.ErrLogin | Login error | Authentication failed (details in error message) |
Usage Examples
Example 1: Basic FTP Connection
// Store the session ID for later use
// Host: "ftp.example.com"
// Port: 21
// Credentials from Vault
// Session ID output: "ftp-session-123"
Use the session ID output from this node in all subsequent FTP operations like Download, Upload, List Directory, etc.
Example 2: Secure FTPS Connection
// For FTPS connections, use port 990 (or custom port)
// FTP Type: FTPS
// Enable "Skip TLS Verification" if the server uses self-signed certificates
// Session ID output: "ftps-session-456"
Example 3: SFTP Connection with Private Key
// For SFTP connections, use port 22
// FTP Type: SFTP
// Provide Private Key file path in options
// Optionally provide Passphrase if the key is encrypted
// Session ID output: "sftp-session-789"
Usage Notes
- The session ID must be passed to all other FTP nodes to perform operations
- Always use the Disconnect node to close the session when done to free server resources
- For versions prior to 23.6.1, TLS verification is automatically skipped for backward compatibility
- FTPS supports client certificate authentication via Private Key and Certificate options
- SFTP supports both password and private key authentication
- Connection timeout is set to 10 seconds
- The same session can be reused for multiple operations
Tips
- Store the Session ID output in a flow variable for reuse across multiple FTP operations
- Use Vault credentials instead of hardcoding usernames and passwords for security
- Test connections with "Skip TLS Verification" enabled first, then disable it for production
- For SFTP, ensure your private key file is accessible and has proper permissions
- Use the Disconnect node in a Try-Catch-Finally pattern to ensure sessions are always closed
- For FTPS with self-signed certificates, enable "Skip TLS Verification" or add the certificate to your trusted store
- Monitor connection timeouts in high-latency networks and adjust retry logic accordingly
Related Nodes
- Disconnect - Close the FTP session
- Upload - Upload files to FTP server
- Download - Download files from FTP server
- List Directory - List files in a directory
- Create Directory - Create a new directory
- Delete File - Delete a file
- Delete Directory - Delete a directory
- Move File - Move or rename a file
- File Exists - Check if a file exists