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

# SFTP

> Transfer files to and from SFTP servers in your automation workflows

## Overview

The SFTP step lets you interact with remote SFTP servers — list directories, download files, upload files, or delete files. Credentials are managed through [secrets](/automations/secrets).

## Configuration

| Field           | Description                                  |
| --------------- | -------------------------------------------- |
| **Host**        | SFTP server hostname                         |
| **Port**        | SFTP server port                             |
| **Action**      | List, Download, Upload, or Delete            |
| **Auth**        | None, Password, or Private Key (via secrets) |
| **Remote Path** | Path on the remote server                    |

### Actions

| Action       | Description                                   |
| ------------ | --------------------------------------------- |
| **List**     | List files and directories at the remote path |
| **Download** | Download a file from the remote path          |
| **Upload**   | Upload a file to the remote path              |
| **Delete**   | Delete a file at the remote path              |

### Authentication

Select an SFTP secret from the auth dropdown:

| Secret Type          | Description                           |
| -------------------- | ------------------------------------- |
| **SFTP Password**    | Username + password authentication    |
| **SFTP Private Key** | Username + private key authentication |

## Output

| Field           | Type    | Description                       |
| --------------- | ------- | --------------------------------- |
| `files`         | array   | File listing or operation results |
| `error`         | boolean | Whether an error occurred         |
| `error_message` | string  | Error description if failed       |
