SFTP

SFTP

SFTP (SSH File Transfer Protocol) is a network protocol that provides file access, file transfer, and file management over any reliable data stream. It was designed by the Internet Engineering Task Force (IETF) as an extension of the Secure Shell protocol (SSH) version 2.0 to provide secure file transfer capabilities.

To use this connector, you will need access to an SSH private key and the SSH private key passphrase.

The following private key formats are supported:

  • OpenSSH
  • ssh.com
  • PuTTY

The content of the SSH private key should be copied/pasted entirely into the “SSH private key” field in the multiline format. Below are sample steps how to provide the SSH private key using Notepad.exe:

  1. Open the SSH private key file in Notepad.exe;
  2. Click Edit → Select All;
  3. Click Edit → Copy;
  4. In the "SSH private key" field (while creating a connection) click right mouse button and click Paste. Do not edit the "SSH private key" field manually.

Trigger limits

The triggers work by polling the SFTP file system, and looking for any file which has been modified since the last poll. Certain tools allow the file modification time to be preserved. In such cases, you need to disable the feature for your trigger to work. Here are some common settings:

SFTP client Action
WinSCP Options → Preferences… → Transfer → Edit… → Preserve timestamp → Disable
FileZilla Transfer → Preserve timestamps of transferred files → Disable

When the triggers encounter a new file, it will try to ensure that the new file is completely written. For instance, it is possible that the file is being written or modified, and updates are being made at the time the trigger polled the file server. To avoid returning a file with partial content, the trigger will take note of the timestamp such files which are modified recently, but will not immediately return those files. Those files will be returned only when the trigger polls again. Sometimes, this may lead a delay up to twice the trigger polling interval.

The trigger doesn't pick up files over 50MB if the content is asked for.

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Creating a connection

To connect your account, you will need the following information:

Host Server Address
string
Host Server Address
User Name
string
User Name
Password
securestring
Password
SSH private key
securestring
SSH private key (the content of the file should be provided entirely as is, in the multiline format)
SSH private key passphrase
securestring
SSH private key passphrase (if the private key is protected by a passphrase)
Port Number
int
SFTP Port Number (example: 22)
Disable SSH Host Key Validation
bool
Disable SSH Host Key Validation? (True/False)
SSH Host Key Finger-print
string
SSH Host Key Finger-print
Disable Resume Capability
bool
Disable Resume Capability? (True/False)

Actions

Copy file

This operation copies a file to an SFTP server.

Required Parameters

Source file path
string
Path to the source file
Destination file path
string
Path to the destination file, including file name

Optional Parameters

Overwrite?
boolean
Overwrites the destination file if set to 'true'

Returns

Body
BlobMetadata

Blob metadata

Create file

This operation uploads a file to an SFTP server.

Required Parameters

Folder path
string
Unique path of the folder
File name
string
Name of the file
File content
binary
Content of the file to create

Returns

Body
BlobMetadata

Blob metadata

Delete file

This operation deletes a file.

Required Parameters

File
string
Specify the file

Returns

Body
BlobMetadata

Blob metadata

Extract archive to folder

This operation extracts an archive file into a folder (example: .zip).

Required Parameters

Source archive file path
string
Path to the archive file
Destination folder path
string
Path to the destination folder

Optional Parameters

Overwrite?
boolean
Overwrites the destination files if set to 'true'

Returns

array of BlobMetadata

Get file content

This operation gets file contents using the file id.

Required Parameters

File
string
Specify the file

Optional Parameters

Infer Content Type
boolean
Infer content-type based on extension

Returns

File Content
binary

The content of the file.

Get file content using path

This operation gets file contents using the file path.

Required Parameters

File path
string
Unique path of the file

Optional Parameters

Infer Content Type
boolean
Infer content-type based on extension

Returns

File Content
binary

The content of the file.

Get file metadata

This operation gets file metadata using the file id.

Required Parameters

File
string
Specify the file

Returns

Body
BlobMetadata

Blob metadata

Get file metadata using path

This operation gets file metadata using the file path.

Required Parameters

File path
string
Unique path of the file

Returns

Body
BlobMetadata

Blob metadata

List files in folder

This operation gets files contained in a folder.

Required Parameters

Folder
string
Specify the folder

Returns

array of BlobMetadata

List files in root folder

This operation gets the files in the root folder.

Required Parameters

Source file path
string
Path to the source file
Destination file path
string
Path to the destination file, including file name

Optional Parameters

Overwrite?
boolean
Overwrites the destination file if set to 'true'

Returns

array of BlobMetadata

Update file

This operation updates the file content.

Required Parameters

File
string
Specify the file
File content
binary
Content of the file to update

Returns

Body
BlobMetadata

Blob metadata

Triggers

When a file is added or modified

This operation triggers a flow when a file is added or modified in a folder. The trigger will fetch both the file metadata as well as the content of the file. The trigger relies on the last modified time of a file. If a file is being created by a third-party client, the preservation of the last modified time should be disabled in the client. Files larger than 50 megabytes are skipped by the trigger.

Required Parameters

Folder
string
Specify a folder

Optional Parameters

Include file content
boolean
If set to true, file content will also be retrieved along with the trigger response
Infer Content Type
boolean
Infer content-type based on extension

Returns

File Content
binary

The content of the file.

When a file is added or modified (properties only)

This operation triggers a flow when a file is added or modified in a folder. This trigger will only fetch the file metadata. To get the file content, you can use the "Get file content" operation. The trigger relies on the last modified time of a file. If a file is being created by a third-party client, the preservation of the last modified time should be disabled in the client.

Required Parameters

Folder
string
Select a folder

Returns

List of Files
BlobMetadata

Blob metadata

Definitions

BlobMetadata

Blob metadata

DisplayName
string
The display name of the file or folder.
ETag
string
The etag of the file or folder.
FileLocator
string
The filelocator of the file or folder.
Id
string
The unique id of the file or folder.
IsFolder
boolean
A boolean value (true, false) to indicate whether or not the blob is a folder.
LastModified
date-time
The date and time the file or folder was last modified.
MediaType
string
The media type of the file or folder.
Name
string
The name of the file or folder.
Path
string
The path of the file or folder.
Size
integer
The size of the file or folder.