Reference
Adapter: SFTP File Transfer
Transfer files via SFTP protocol.
Purpose
Upload, download, list, rename and delete files on an SFTP server.
Auth
password, orprivatekeywith an optional passphrase.- Every connection checks the server's host key against
hostKeyFingerprintsorknownHosts. 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.
| Setting | Type | Required | Default | Secret | Description |
|---|---|---|---|---|---|
host | string | Yes | No | SFTP server hostname. | |
port | number | No | 22 | No | SFTP port. |
username | string | Yes | No | Username. | |
authType | enum: password, privatekey | Yes | No | Authentication method. | |
password | string | No | Yes | ||
privateKey | string | No | Yes | ||
passphrase | string | No | Yes | Passphrase for private key. | |
timeout | number | No | 30000 | No | Connection timeout in milliseconds. |
hostKeyFingerprints | array of string | No | No | Pinned server host-key fingerprints (ssh-keyscan host | ssh-keygen -lf -). | |
knownHosts | string | No | No | known_hosts lines whose keys are trusted. | |
insecureSkipHostKeyCheck | boolean | No | false | No | Accept any server host key (not for PHI). |
uploadMode | enum: temp-rename, direct | No | temp-rename | No | temp-rename writes a hidden .part file then renames it; direct writes the final name. |
createDirs | boolean | No | false | No | Create the remote parent directory before upload. |
writeMode | enum: overwrite, append, error-if-exists | No | overwrite | No | overwrite replaces an existing file; append adds to it (written directly, no temp file); error-if-exists fails the step. |
operationTimeout | number | No | 300000 | No | Longest 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.
| Action | What it does | Step parameters | Keys a message may supply |
|---|---|---|---|
download | Download a file from SFTP server. | remotePath, localPath?, encoding? | None |
upload | Upload a file to SFTP server. | localPath?, remotePath, filenamePattern?, content?, createDirs?, writeMode? | content |
list | List files in a directory. | remotePath? | None |
delete | Delete a file from SFTP server. | remotePath | None |
rename | Move (rename) a file on the SFTP server. | fromPath, toPath | None |
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
.partfile and rename it by default (uploadMode), so a reader never sees half a file. remotePathandfilenamePatterntake 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.