Skip to main content

SFTP

The SFTP node transfers files over the SSH File Transfer Protocol (SFTP). Unlike FTP, SFTP encrypts both commands and data over a single SSH connection, making it suitable for secure file exchange. It supports the same operations as the FTP node: upload, download, delete, rename, and list.

Before You Use This Node

What you may needWhere to set it upWhy it matters
SFTP server connectionConnectionsSave server details once, then reuse them for secure file actions.
Private key or files to uploadFilesStore files centrally, from cloud storage or local storage, and reference them in SFTP steps.
Folder paths or file name patternsGlobal VariablesKeep common paths consistent across workflows.

Actions

ActionDescription
sftp:uploadFileUpload a file to the SFTP server
sftp:downloadFileDownload files from the SFTP server into job-execution storage
sftp:deleteFileOrFolderDelete a file or folder on the SFTP server
sftp:renameOrMoveFileFolderRename or move files and folders on the SFTP server
sftp:listFolderContentList the contents of a directory on the SFTP server

sftp:uploadFile

Uploads a file to the specified remote path.

Parameters

ParameterTypeRequiredDescription
remotePathstringYesFull path on the remote server including file name
contentstringYesBase64-encoded file content
createDirectoriesbooleanNoCreate parent directories if they don't exist. Defaults to false
permissionsstringNoUnix file permissions (e.g., 644). Applies after upload

sftp:downloadFile

Downloads one or more files from the remote server and uploads them into job-execution artifact storage so later steps can use them.

Parameters

ParameterTypeRequiredDescription
connectionstringYesThe saved SFTP connection to use
pathsstringYesRemote path(s) to download. Supports expression references

The download target is fixed to LOCAL_STORAGE. Each downloaded file is uploaded to the job-execution artifact store and surfaced in the result's artifacts array (see Output).

sftp:deleteFileOrFolder

Deletes a file or folder on the remote server.

Parameters

ParameterTypeRequiredDescription
remotePathstringYesFull path to the file or folder to delete

sftp:renameOrMoveFileFolder

Renames or moves files and folders on the remote server. This single action also covers moving files between directories, with optional filtering — there is no separate move-files action.

Parameters

ParameterTypeRequiredDefaultDescription
oldPathstringYes--Current path of the file or folder
newPathstringYes--Destination path
createDirectorybooleanNofalseCreate missing destination directories
overwritebooleanNofalseWhen false, a date suffix is appended to avoid overwriting an existing target
filterTypestringNo--For directory moves: include or exclude
filterPatternslistNo--Glob patterns (*, ?; a trailing / matches directories) applied with filterType

sftp:listFolderContent

Lists files and directories at a given path.

Parameters

ParameterTypeRequiredDescription
remotePathstringYesDirectory path to list
filePatternstringNoGlob pattern to filter files (e.g., *.csv)

Connection

Requires an SFTP connection configured in the Global Configurator:

FieldDescription
hostSFTP server hostname or IP
portSSH port. Defaults to 22
usernameSSH username
passwordSSH password (if using password auth)
privateKeySSH private key content (if using key-based auth)
passphrasePrivate key passphrase (if the key is encrypted)
strictHostKeyCheckingVerify the server's host key. Defaults to true

Configure under Connections > SFTP in the Global Configurator.

Output

downloadFile

The result carries the standard execution fields plus an artifacts array describing each file uploaded to job-execution storage:

{
"result": null,
"stdout": "...",
"stderr": "",
"success": true,
"executionTimeMs": 842,
"exitCode": 0,
"error": null,
"artifacts": [
{
"storagePath": "job-executions/.../invoice.csv",
"fileName": "invoice.csv",
"mimeType": "text/csv",
"size": 20481
}
]
}

If a downloaded file cannot be written to artifact storage, the step fails with an ARTIFACT_UPLOAD_FAILED error.

uploadFile, deleteFileOrFolder, renameOrMoveFileFolder, listFolderContent

These actions return the standard execution result indicating success or failure. listFolderContent returns the directory listing in its result payload.