> ## Documentation Index
> Fetch the complete documentation index at: https://docs.condotta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# FTP / SFTP

> Transfer files via FTP, FTPS, or SFTP: browse, upload, download, and manage remote files.

The FTP / SFTP connector lets your workflows transfer files to and from any FTP, FTPS, or SFTP server. Browse directories, upload and download files, and manage remote file systems directly from your workflows.

> [!NOTE]
>
> This connector requires a **connection** with valid credentials before it can be used in a workflow. See [Managing Connections](https://docs.condotta.ai/platform/connections.md) for setup instructions.

## Connection setup

**1. Choose your protocol**

Select **FTP** or **SFTP** depending on your server:

* **FTP**: Standard file transfer (port 21). Optionally enable FTPS (TLS) for encrypted connections.
* **SFTP**: SSH-based file transfer (port 22). Supports password or private key authentication.

**2. Add the connection in Condotta**

Go to **Connections** in Condotta, click **Add Connection**, select **FTP / SFTP**, and enter:

* **Protocol**: `ftp` or `sftp`
* **Host**: Your server hostname (e.g., `ftp.example.com`)
* **Port**: Server port (`21` for FTP, `22` for SFTP)
* **Username**: Your login username
* **Password**: Your login password (optional for SFTP with private key)

**FTP-only options:**

* **Enable FTPS (TLS)**: Turn on for encrypted FTP connections

**SFTP-only options:**

* **SSH Private Key**: Paste your private key for key-based auth (password becomes optional)

> [!NOTE]
>
> **FTP vs SFTP**: Despite similar names, these are different protocols. FTP (and FTPS) uses the FTP protocol on port 21. SFTP uses SSH on port 22. Check with your server administrator which protocol is supported.

> [!TIP]
>
> **Binary files**: Use `base64` encoding when downloading or uploading binary files (images, PDFs, archives). Text files use `utf8` by default.

> [!TIP]
>
> **SFTP private key auth**: Paste your full private key (including `-----BEGIN ... KEY-----` and `-----END ... KEY-----` lines) into the SSH Private Key field. When a private key is provided, the password field is optional.

## Tools

> [accordion] verify-connection: Test connection
>
> Verifies that the server is reachable and the credentials are valid. No parameters required.
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "message": "SFTP connection verified successfully"
>   }
> }
> ```

> [accordion] list-directory: List files and directories
>
> **path** `string`
>
> Remote directory path. Defaults to `/`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "path": "/uploads/2026"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "path": "/uploads/2026",
>     "entries": [
>       {
>         "name": "orders.csv",
>         "type": "file",
>         "size": 24580,
>         "modifiedAt": "2026-03-15T10:30:00.000Z"
>       },
>       {
>         "name": "images",
>         "type": "directory",
>         "size": 0,
>         "modifiedAt": "2026-03-10T08:00:00.000Z"
>       },
>       {
>         "name": "report-march.pdf",
>         "type": "file",
>         "size": 1048576,
>         "modifiedAt": "2026-04-01T14:22:00.000Z"
>       }
>     ]
>   }
> }
> ```

> [accordion] create-directory: Create a directory
>
> **path** `string` *required*
>
> Remote directory path to create. Intermediate directories are created automatically.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "path": "/uploads/2026/april"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "path": "/uploads/2026/april",
>     "message": "Directory created"
>   }
> }
> ```

> [accordion] remove-directory: Remove a directory
>
> **path** `string` *required*
>
> Remote directory path to remove. The directory must be empty.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "path": "/uploads/2026/temp"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "path": "/uploads/2026/temp",
>     "message": "Directory removed"
>   }
> }
> ```

> [accordion] download-file: Download a file
>
> **path** `string` *required*
>
> Remote file path to download.
>
> **encoding** `string`
>
> Output encoding: `utf8` (default) for text files, `base64` for binary files.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "path": "/uploads/2026/orders.csv",
>   "encoding": "utf8"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "path": "/uploads/2026/orders.csv",
>     "content": "order_id,customer,total\n1001,John Smith,99.95\n1002,Jane Doe,149.50\n",
>     "encoding": "utf8",
>     "size": 68
>   }
> }
> ```

> [accordion] upload-file: Upload a file
>
> **path** `string` *required*
>
> Remote file path to upload to. Overwrites if the file already exists.
>
> **content** `string` *required*
>
> File content to upload.
>
> **encoding** `string`
>
> Content encoding: `utf8` (default) for text, `base64` for binary.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "path": "/uploads/2026/inventory-update.csv",
>   "content": "sku,qty\nSKU-001,50\nSKU-002,120\nSKU-003,0\n",
>   "encoding": "utf8"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "path": "/uploads/2026/inventory-update.csv",
>     "size": 42,
>     "message": "File uploaded"
>   }
> }
> ```

> [accordion] delete-file: Delete a file
>
> **path** `string` *required*
>
> Remote file path to delete.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "path": "/uploads/2026/old-report.pdf"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "path": "/uploads/2026/old-report.pdf",
>     "message": "File deleted"
>   }
> }
> ```

> [accordion] rename: Rename or move a file/directory
>
> **from** `string` *required*
>
> Current remote path.
>
> **to** `string` *required*
>
> New remote path.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "from": "/uploads/2026/orders.csv",
>   "to": "/archive/2026/orders-march.csv"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "from": "/uploads/2026/orders.csv",
>     "to": "/archive/2026/orders-march.csv",
>     "message": "Renamed successfully"
>   }
> }
> ```

> [accordion] get-file-info: Get file information
>
> **path** `string` *required*
>
> Remote file path.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "path": "/uploads/2026/orders.csv"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "path": "/uploads/2026/orders.csv",
>     "size": 24580,
>     "modifiedAt": "2026-03-15T10:30:00Z"
>   }
> }
> ```

> [card] [Try this free for 14 days](https://preview.condotta.ai/signup)
>
> Start a 14-day trial on Band 1. At day 14, choose your band, or stop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.