SFTP - SSH

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.

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions
Flow Standard All Flow regions
PowerApps Standard All PowerApps regions

Creating a connection

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

Name Type Description
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

Root folder path string

Root folder path.

Throttling Limits

Name Calls Renewal Period
API calls per connection15060 seconds

Actions

Copy file

This operation copies a file.

Create file

This operation uploads a file.

Create folder

This operation creates a new folder.

Delete file

This operation deletes a file.

Extract archive to folder

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

Get file content

This operation gets file contents using the file id.

Get file content using path

This operation gets file contents using the file path.

Get file metadata

This operation gets file metadata using the file id.

Get file metadata using path

This operation gets file metadata using the file path.

List files in folder

This operation gets files contained in a folder.

List files in root folder

This operation gets the files in the root folder.

Rename File

This operation renames a file.

Update file

This operation updates the file content.

Copy file

This operation copies a file.

Parameters

Name Key Required Type Description
Source file path
source True string

Path to the source file

Destination file path
destination True string

Path to the destination file, including file name

Overwrite?
overwrite boolean

Overwrites the destination file if set to 'true'

Returns

Blob metadata

Create file

This operation uploads a file.

Parameters

Name Key Required Type Description
Folder path
folderPath True string

Unique path of the folder

File name
name True string

Name of the file

File content
body True binary

Content of the file to create

Returns

Blob metadata

Create folder

This operation creates a new folder.

Parameters

Name Key Required Type Description
Folder
folderPath True string

Select a folder

Name
name True string

Name of the folder

Returns

Blob metadata

Delete file

This operation deletes a file.

Parameters

Name Key Required Type Description
File
id True string

Specify the file

Extract archive to folder

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

Parameters

Name Key Required Type Description
Source archive file path
source True string

Path to the archive file

Destination folder path
destination True string

Path to the destination folder

Overwrite?
overwrite boolean

Overwrites the destination files if set to 'true'

Returns

Get file content

This operation gets file contents using the file id.

Parameters

Name Key Required Type Description
File
id True string

Specify the file id

Infer Content Type
inferContentType boolean

Infer content-type based on extension

Returns

The content of the file.

File Content
binary

Get file content using path

This operation gets file contents using the file path.

Parameters

Name Key Required Type Description
File path
path True string

Unique path of the file

Infer Content Type
inferContentType boolean

Infer content-type based on extension

Returns

The content of the file.

File Content
binary

Get file metadata

This operation gets file metadata using the file id.

Parameters

Name Key Required Type Description
File
id True string

Specify the file id

Returns

Blob metadata

Get file metadata using path

This operation gets file metadata using the file path.

Parameters

Name Key Required Type Description
File path
path True string

Unique path of the file

Returns

Blob metadata

List files in folder

This operation gets files contained in a folder.

Parameters

Name Key Required Type Description
Folder
id True string

Specify the folder

Returns

List files in root folder

This operation gets the files in the root folder.

Returns

Rename File

This operation renames a file.

Parameters

Name Key Required Type Description
File
id True string

Select a file

New name
newName True string

New name for the file

Returns

Represents blob datasets metadata response

Update file

This operation updates the file content.

Parameters

Name Key Required Type Description
File
id True string

Specify the file

File content
body True binary

Content of the file to update

Returns

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. The trigger does not fire if a file is added/updated in a subfolder. If it is required to trigger on subfolders, multiple triggers should be created.

When files are 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. The trigger does not fire if a file is added/updated in a subfolder. If it is required to trigger on subfolders, multiple triggers should be created.

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. The trigger does not fire if a file is added/updated in a subfolder. If it is required to trigger on subfolders, multiple triggers should be created.

Parameters

Name Key Required Type Description
Folder
folderId True string

Specify a folder

Include file content
includeFileContent boolean

If set to true, file content will also be retrieved along with the trigger response

Infer Content Type
inferContentType boolean

Infer content-type based on extension

Returns

The content of the file.

File Content
binary

When files are 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. The trigger does not fire if a file is added/updated in a subfolder. If it is required to trigger on subfolders, multiple triggers should be created.

Parameters

Name Key Required Type Description
Folder
folderId True string

Select a folder

Number of files
maxFileCount integer

Number of files returned from the trigger (1-100)

Returns

Blob metadata

List of Files
BlobMetadata

Definitions

BlobMetadata

Blob metadata

Name Path Type Description
Id
Id string

The unique id of the file or folder.

Name
Name string

The name of the file or folder.

DisplayName
DisplayName string

The display name of the file or folder.

Path
Path string

The path of the file or folder.

LastModified
LastModified date-time

The date and time the file or folder was last modified.

Size
Size integer

The size of the file or folder.

MediaType
MediaType string

The media type of the file or folder.

IsFolder
IsFolder boolean

A boolean value (true, false) to indicate whether or not the blob is a folder.

ETag
ETag string

The etag of the file or folder.

FileLocator
FileLocator string

The filelocator of the file or folder.

BlobMetadataResponse

Represents blob datasets metadata response

Name Path Type Description
Id
Id string

The unique id of the file or folder.

Name
Name string

The name of the file or folder.

DisplayName
DisplayName string

The display name of the file or folder.

Path
Path string

The path of the file or folder.

LastModified
LastModified date-time

The date and time the file or folder was last modified.

Size
Size integer

The size of the file or folder.

MediaType
MediaType string

The media type of the file or folder.

IsFolder
IsFolder boolean

A boolean value (true, false) to indicate whether or not the blob is a folder.

ETag
ETag string

The etag of the file or folder.

FileLocator
FileLocator string

The filelocator of the file or folder.