Skip to content
Reference

Adapter: SFTP File Transfer

Transfer files via SFTP protocol.

On this page

Purpose

Upload, download, list, rename and delete files on an SFTP server.

Auth

  • password, or privatekey with an optional passphrase.
  • Every connection checks the server's host key against hostKeyFingerprints or knownHosts. There is no trust on first use.

Settings

Auth is chosen with authType: password, privatekey. Dotted names are fields inside an object setting. Secret settings are encrypted at rest, never returned by a read, and shown masked in the console and in exports; their defaults are not shown.

SettingTypeRequiredDefaultSecretDescription
hoststringYesNoSFTP server hostname.
portnumberNo22NoSFTP port.
usernamestringYesNoUsername.
authTypeenum: password, privatekeyYesNoAuthentication method.
passwordstringNoYes
privateKeystringNoYes
passphrasestringNoYesPassphrase for private key.
timeoutnumberNo30000NoConnection timeout in milliseconds.
hostKeyFingerprintsarray of stringNoNoPinned server host-key fingerprints (ssh-keyscan host | ssh-keygen -lf -).
knownHostsstringNoNoknown_hosts lines whose keys are trusted.
insecureSkipHostKeyCheckbooleanNofalseNoAccept any server host key (not for PHI).
uploadModeenum: temp-rename, directNotemp-renameNotemp-rename writes a hidden .part file then renames it; direct writes the final name.
createDirsbooleanNofalseNoCreate the remote parent directory before upload.
writeModeenum: overwrite, append, error-if-existsNooverwriteNooverwrite replaces an existing file; append adds to it (written directly, no temp file); error-if-exists fails the step.
operationTimeoutnumberNo300000NoLongest one upload, download, list or delete may take (ms) before the session is closed.

Actions

A trailing ? marks an optional step parameter. A message can supply only the keys in the last column; everything else comes from the step.

ActionWhat it doesStep parametersKeys a message may supply
downloadDownload a file from SFTP server.remotePath, localPath?, encoding?None
uploadUpload a file to SFTP server.localPath?, remotePath, filenamePattern?, content?, createDirs?, writeMode?content
listList files in a directory.remotePath?None
deleteDelete a file from SFTP server.remotePathNone
renameMove (rename) a file on the SFTP server.fromPath, toPathNone

Minimal example

The smallest profile the engine accepts: the required settings only, with synthetic values. Create it with POST /api/adapter-profiles, then test it with POST /api/adapter-profiles/{id}/test.

json
{
  "name": "SFTP File Transfer (example)",
  "adapterType": "sftp",
  "config": {
    "host": "example-host",
    "username": "example-username",
    "authType": "password"
  }
}

Limits

  • Uploads write a hidden .part file and rename it by default (uploadMode), so a reader never sees half a file.
  • remotePath and filenamePattern take name templates. Include a unique token, or the next message overwrites the file.
  • A rename whose reply was lost may have happened, so it is not retried.
  • To watch a folder, use the SFTP pickup trigger, or a file pickup trigger on this profile. For FTPS use the FTP / FTPS adapter.

Reference