SFTP

Use SFTP (SSH File Transfer Protocol) to upload or download files, list directories with optional metadata, delete files or directories, and create directories on a remote server. Authenticate with a password or OpenSSH private key; provide a passphrase for an encrypted key.

Uploads accept workspace files or direct text content. The current Download operation returns a stored file reference for later workflow steps. Recursive deletion removes directory contents, so check the target path before enabling it.

Use the block

Upload, download, list, and manage files on remote servers via SFTP. Supports both password and private key authentication for secure file transfers.

Actions

SFTP Upload

Upload files to a remote SFTP server

Input

ParameterTypeRequiredDescription
hoststringYesSFTP server hostname or IP address
portnumberYesSFTP server port (default: 22)
usernamestringYesSFTP username
passwordstringNoPassword for authentication (if not using private key)
privateKeystringNoPrivate key for authentication (OpenSSH format)
passphrasestringNoPassphrase for encrypted private key
remotePathstringYesDestination directory on the remote server
filesfile[]NoFiles to upload
fileContentstringNoDirect file content to upload (for text files)
fileNamestringNoFile name when using direct content
overwritebooleanNoWhether to overwrite existing files (default: true)
permissionsstringNoFile permissions (e.g., 0644)

Output

ParameterTypeDescription
successbooleanWhether the upload was successful
uploadedFilesjsonArray of uploaded file details (name, remotePath, size)
messagestringOperation status message

SFTP Download

Download a file from a remote SFTP server

Input

ParameterTypeRequiredDescription
hoststringYesSFTP server hostname or IP address
portnumberYesSFTP server port (default: 22)
usernamestringYesSFTP username
passwordstringNoPassword for authentication (if not using private key)
privateKeystringNoPrivate key for authentication (OpenSSH format)
passphrasestringNoPassphrase for encrypted private key
remotePathstringYesPath to the file on the remote server

Output

ParameterTypeDescription
filefileDownloaded file stored in execution files

SFTP List Directory

List files and directories on a remote SFTP server

Input

ParameterTypeRequiredDescription
hoststringYesSFTP server hostname or IP address
portnumberYesSFTP server port (default: 22)
usernamestringYesSFTP username
passwordstringNoPassword for authentication (if not using private key)
privateKeystringNoPrivate key for authentication (OpenSSH format)
passphrasestringNoPassphrase for encrypted private key
remotePathstringYesDirectory path on the remote server
detailedbooleanNoInclude detailed file information (size, permissions, modified date)

Output

ParameterTypeDescription
successbooleanWhether the operation was successful
pathstringDirectory path that was listed
entriesjsonArray of directory entries with name, type, size, permissions, modifiedAt
countnumberNumber of entries in the directory
messagestringOperation status message

SFTP Delete

Delete a file or directory on a remote SFTP server

Input

ParameterTypeRequiredDescription
hoststringYesSFTP server hostname or IP address
portnumberYesSFTP server port (default: 22)
usernamestringYesSFTP username
passwordstringNoPassword for authentication (if not using private key)
privateKeystringNoPrivate key for authentication (OpenSSH format)
passphrasestringNoPassphrase for encrypted private key
remotePathstringYesPath to the file or directory to delete
recursivebooleanNoDelete directories recursively

Output

ParameterTypeDescription
successbooleanWhether the deletion was successful
deletedPathstringPath that was deleted
messagestringOperation status message

SFTP Create Directory

Create a directory on a remote SFTP server

Input

ParameterTypeRequiredDescription
hoststringYesSFTP server hostname or IP address
portnumberYesSFTP server port (default: 22)
usernamestringYesSFTP username
passwordstringNoPassword for authentication (if not using private key)
privateKeystringNoPrivate key for authentication (OpenSSH format)
passphrasestringNoPassphrase for encrypted private key
remotePathstringYesPath for the new directory
recursivebooleanNoCreate parent directories if they do not exist

Output

ParameterTypeDescription
successbooleanWhether the directory was created successfully
createdPathstringPath of the created directory
messagestringOperation status message