इसके माध्यम से साझा किया गया


SFTP [DEPRECATED]

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 and Integration Service Environments (ISEs) except the following:
     -   US Department of Defense (DoD)
Power Automate Standard All Power Automate regions except the following:
     -   US Government (GCC High)
     -   US Department of Defense (DoD)
Power Apps Standard All Power Apps regions except the following:
     -   US Government (GCC High)
     -   US Department of Defense (DoD)
Contact
Name Microsoft
URL Microsoft LogicApps Support
Microsoft Power Automate Support
Microsoft Power Apps Support
Connector Metadata
Publisher Microsoft

This connector is on its deprecation path, please use the new SFTP-SSH connector. Please read more how to use the new connector here.

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, comparing files by modification time. 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. This also means that the trigger does not guarantee to return all files in a single run when "Split On" option is disabled.

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

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.

Connector in-depth

For more information about the connector, see the in-depth section.

General Limits

Name Value
Maximum total number of requests per SFTP server address per minute 600
Maximum number of megabytes being transferred to/from the connector within a bandwidth time interval (per connection) 1000
Bandwidth time interval (in miliseconds) 60000

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Not shareable

Default

Applicable: All regions

Parameters for creating connection.

This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.

Name Type Description Required
Host Server Address string Host Server Address True
User Name string User Name True
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)

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Actions

Copy file [DEPRECATED]

This action has been deprecated. Please use Copy file instead.

This operation copies a file to an SFTP server. If a file is being deleted/renamed on server right after it was copied, connector may return HTTP 404 error by it's design. Please use a delay for 1 minute before deleting or renaming newly created file.

Create file [DEPRECATED]

This action has been deprecated. Please use Create file instead.

This operation uploads a file to an SFTP server. If a file is being deleted/renamed on server right after it was created, connector may return HTTP 404 error by it's design. Please use a delay for 1 minute before deleting or renaming newly created file.

Delete file [DEPRECATED]

This action has been deprecated. Please use Delete file instead.

This operation deletes a file.

Extract archive to folder [DEPRECATED]

This action has been deprecated. Please use Extract archive to folder instead.

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

Get file content [DEPRECATED]

This action has been deprecated. Please use Get file content instead.

This operation gets file contents using the file id.

Get file content using path [DEPRECATED]

This action has been deprecated. Please use Get file content using path instead.

This operation gets file contents using the file path.

Get file metadata [DEPRECATED]

This action has been deprecated. Please use Get file metadata instead.

This operation gets file metadata using the file id.

Get file metadata using path [DEPRECATED]

This action has been deprecated. Please use Get file metadata using path instead.

This operation gets file metadata using the file path.

List files in folder [DEPRECATED]

This action has been deprecated. Please use List files in folder instead.

This operation gets files contained in a folder.

List files in root folder [DEPRECATED]

This action has been deprecated. Please use List files in root folder instead.

This operation gets the files in the root folder.

Update file [DEPRECATED]

This action has been deprecated. Please use Update file instead.

This operation updates the file content. If a file is being deleted/renamed on server right after it was updated, connector may return HTTP 404 error by it's design. Please use a delay for 1 minute before deleting or renaming recently updated file.

Copy file [DEPRECATED]

This action has been deprecated. Please use Copy file instead.

This operation copies a file to an SFTP server. If a file is being deleted/renamed on server right after it was copied, connector may return HTTP 404 error by it's design. Please use a delay for 1 minute before deleting or renaming newly created 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 [DEPRECATED]

This action has been deprecated. Please use Create file instead.

This operation uploads a file to an SFTP server. If a file is being deleted/renamed on server right after it was created, connector may return HTTP 404 error by it's design. Please use a delay for 1 minute before deleting or renaming newly created 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

Delete file [DEPRECATED]

This action has been deprecated. Please use Delete file instead.

This operation deletes a file.

Parameters

Name Key Required Type Description
File
id True string

Specify the file

Extract archive to folder [DEPRECATED]

This action has been deprecated. Please use Extract archive to folder instead.

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 [DEPRECATED]

This action has been deprecated. Please use Get file content instead.

This operation gets file contents using the file id.

Parameters

Name Key Required Type Description
File
id True string

Specify the file

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 [DEPRECATED]

This action has been deprecated. Please use Get file content using path instead.

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 [DEPRECATED]

This action has been deprecated. Please use Get file metadata instead.

This operation gets file metadata using the file id.

Parameters

Name Key Required Type Description
File
id True string

Specify the file

Returns

Blob metadata

Get file metadata using path [DEPRECATED]

This action has been deprecated. Please use Get file metadata using path instead.

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 [DEPRECATED]

This action has been deprecated. Please use List files in folder instead.

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 [DEPRECATED]

This action has been deprecated. Please use List files in root folder instead.

This operation gets the files in the root folder.

Returns

Update file [DEPRECATED]

This action has been deprecated. Please use Update file instead.

This operation updates the file content. If a file is being deleted/renamed on server right after it was updated, connector may return HTTP 404 error by it's design. Please use a delay for 1 minute before deleting or renaming recently updated file.

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 (properties only) [DEPRECATED]

This action has been deprecated. Please use When files are added or modified (properties only) instead.

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 [DEPRECATED]

This action has been deprecated. Please use When a file is added or modified instead.

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 a file is added or modified (properties only) [DEPRECATED]

This action has been deprecated. Please use When files are added or modified (properties only) instead.

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 to return from the trigger
maxFileCount integer

Maximum number of files to return by single trigger run (1-100). Note that 'Split On' setting can force trigger to process each item individually.

Returns

Blob metadata

List of Files
BlobMetadata

When a file is added or modified [DEPRECATED]

This action has been deprecated. Please use When a file is added or modified instead.

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

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.

binary

This is the basic data type 'binary'.