# SFTP

The SFTP Data Operation securely transfers a file to a remote resource. An SFTP resource is required and can be created in the [Console](../../console/console).

## Use Cases

* Send a report to a remote server

## Data Operation Properties

### Datasource

An SFTP data source with the correct username and password for the connection. To create an SFTP data source, see [Creating SFTP Credentials](../../integration-guides/integrations-overview/integration-guides/creating-sftp-credentials).

### File Asset

Expects type `asset`.

An [Asset Data Type](../../variable-data-types/the-asset-data-type) to be sent to the remote server.

### Host

Expects type `text`

The hostname or IP to connect to.

### Port

Expects type `number`.

The port on the remote server to connect to. The default for SFTP is 22. This is a number value.

### Remote Path

Expects type `text`.

Where on the remote server to place the file.

### Remote Filename

Expects type `text`.

The filename to name the file on the remote server. If none is provided, the same filename will be used.

## Run Results

The returned object contains information about the SFTP operation. The object contains the following properties:

* **success**: a boolean representing whether the operation was successful
* **message**: a text message about the operation performed
* **debug**: an object containing information about the upload experience
* **timing**: object containing information about the time the operation took
* **paths**: information about the file or files being uploaded
* **username**: the SFTP username that performed the operation
* **successMessage**: a more detailed message about the operation performed

\[block:callout] { "type": "info", "body": "If an operation fails because of an invalid path, the operation might not return.", "title": "Invalid Paths" } \[/block]

\[block:callout] { "type": "info", "title": "SFTP Directories", "body": "If an SFTP directory does not exist, the data operation will make an attempt to create a directory. This is dependent on server permissions and permissions associated with the user." } \[/block]
