On this page
Sommatic Docs
Open portal

FTP/SFTP Client

Transfer files via FTP/SFTP.

View as Markdown
Open in
Input and output Available io.ftp Version 1.0.0 Execution: async

Lists, uploads, downloads or deletes one remote file over FTP, FTPS or SFTP, using a credential resolved on the server.

How it works

  1. Resolves the config. connection_id, operation (default list), remotePath and fileContent fall back to the same keys of the incoming payload.
  2. Resolves the credential: host (default 127.0.0.1), port, protocol and secure come from the credential config; username and password from its secret.
  3. Chooses the protocol: SFTP when the port is 22 or 2222 or protocol is sftp; otherwise FTP (FTPS when secure is true). Without a port in the credential it uses 22 for SFTP and 21 for FTP.
  4. Runs the operation: list (directory listing of remotePath), upload (writes fileContent to remotePath), download (reads remotePath as UTF-8 text) or delete.
  5. Returns { result } through out, closes the connection, and sends protocol errors to error.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-download-orders",
  "label": "Download orders file",
  "operator_slug": "io.ftp",
  "operator_version": "1.0.0",
  "config": {
    "connection_id": "pi-credential-xxxx",
    "operation": "download",
    "remotePath": "/outbound/orders-{{ $json.date }}.csv"
  }
}

Configuration

connection_id string Required

Credential for the FTP/SFTP server. Accepts credentials of type `basic-auth` (username + password + host + port) or `connection-string` (ftp:// / sftp:// URI).

operation string Required

Default: list

Allowed values: listuploaddownloaddelete

remotePath string Optional
localPath string Optional

For upload/download

fileContent string Optional

Direct content for upload

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

connection_id
Accepts basic-auth credentials whose config holds host, port, protocol (sftp to force SFTP) and secure, and whose secret holds username and password. A connection-string secret (an ftp:// URI) is not parsed: host and port must be in the credential config. A value starting with { is parsed as inline JSON { config, credentials } instead of a credential id; use it only for local tests.
localPath
Declared but ignored: uploads read fileContent, downloads return the content in the output. Nothing is read from or written to the local disk.
remotePath
list uses / (FTP) or . (SFTP) when empty.
port Read by the code, not declared
Not declared. Read only as a hint: when the credential has no port and the node config has port: 22, SFTP on port 22 is used.

Output ports

out default

The operation succeeded. result is an array of entries for list, { content } for download, { uploaded: true, path } for upload and { deleted: true } for delete. FTP list entries carry the library's file info (name, type 1 = file, 2 = directory, size, rawModifiedAt, …); SFTP entries carry only name, type and size.

Data
{
  "result": [
    {
      "name": "orders-2026-11-25.csv",
      "type": 1,
      "size": 18342
    },
    {
      "name": "archive",
      "type": 2,
      "size": 4096
    }
  ]
}
error

Login, transfer or path errors, a missing argument for the operation, an unsupported operation, or an SFTP connection that closed early.

Data
{
  "error": "remotePath is required for download"
}

In expressions

What a later node can read from this node's output with $("FTP/SFTP Client").item.json.<path> (write your node's label instead of FTP/SFTP Client). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.

ExpressionEditorWorker
$("FTP/SFTP Client").item.json.resultobject= […] (2)FTP operation result (e.g. list, or success)

Errors

Message Port Cause and fix
connection_id is required error Thrown before the worker connects, so the engine fails the node (and the run, unless a flow.try scope catches it). Select an FTP or SFTP credential.
Failed to resolve connection <connection_id>: <detail> error The credential does not exist or cannot be used by this workflow. Also thrown, so the run fails outside a flow.try scope.
fileContent is required for upload error FTP upload without content (remotePath is required for upload and remotePath is required for download are the FTP equivalents for the path; SFTP reports fileContent is required).
Unsupported operation: <operation> error operation is not list, upload, download or delete.
SSH connection closed error The SFTP server closed the connection before the operation finished, typically after a rejected login.

Input contract

connection_id string Required
operation string Required
remotePath string Optional
localPath string Optional
fileContent string Optional

Output contract

result object Optional

FTP operation result (e.g. list, or success)

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "io.ftp",
  "name": "FTP/SFTP Client",
  "category": "io",
  "version": "1.0.0",
  "description": "Transfer files via FTP/SFTP.",
  "capabilities": [
    "storage",
    "ftp",
    "sftp"
  ],
  "config_schema": {
    "type": "object",
    "properties": {
      "connection_id": {
        "type": "string",
        "title": "FTP / SFTP Credential",
        "description": "Credential for the FTP/SFTP server. Accepts credentials of type `basic-auth` (username + password + host + port) or `connection-string` (ftp:// / sftp:// URI).",
        "ui_widget": "connection_picker",
        "ui_options": {
          "credential_types": [
            "basic-auth",
            "connection-string"
          ],
          "types": [
            "ftp",
            "sftp"
          ]
        }
      },
      "operation": {
        "type": "string",
        "enum": [
          "list",
          "upload",
          "download",
          "delete"
        ],
        "default": "list"
      },
      "remotePath": {
        "type": "string"
      },
      "localPath": {
        "type": "string",
        "description": "For upload/download"
      },
      "fileContent": {
        "type": "string",
        "description": "Direct content for upload"
      }
    },
    "required": [
      "connection_id",
      "operation"
    ]
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "connection_id": {
        "type": "string"
      },
      "operation": {
        "type": "string"
      },
      "remotePath": {
        "type": "string"
      },
      "localPath": {
        "type": "string"
      },
      "fileContent": {
        "type": "string"
      }
    },
    "required": [
      "connection_id",
      "operation"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "result": {
        "type": "object",
        "description": "FTP operation result (e.g. list, or success)"
      }
    }
  },
  "ports": [
    {
      "port_id": "out",
      "label": "Result",
      "description": "Operation result",
      "is_default": true,
      "supports_condition": true
    },
    {
      "port_id": "error",
      "label": "Error",
      "description": "Transfer failed",
      "is_default": false,
      "supports_condition": false
    }
  ],
  "execution_mode": "async",
  "required_resources": [],
  "compatible_worker_pools": [
    "standard-io"
  ],
  "tags": [
    "storage",
    "legacy"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_link_loom",
    "profile": {
      "name": "Link Loom",
      "verified": true,
      "url": "https://me.veripass.com/link-loom",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Credentials
Resolved on the server from connection_id; the secret never reaches the workflow.
Capabilities
storageftpsftp
Tags
storagelegacy

Notes and limits

  • Downloads are returned as UTF-8 text: binary files are corrupted. Uploads send fileContent as text.
  • SFTP waits up to 15 s for the handshake. FTP has no explicit timeout beyond the library defaults. There are no retries.
  • The credential secret is resolved on the server at run time and never appears in the output.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs