FTP

The File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files between a client and server on a computer network. FTP is built on a client-server model architecture and uses separate control and data connections between the client and the server.

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

The FTP Connector requires that the FTP Server be accessible from the cloud and set up to accept PASSIVE mode. The FTP connector doesn't support implicit TLS/SSL configuration. If secure FTP should be used, it should be configured as explicit TLS/SSL.

Trigger limits

The triggers work by polling the FTP 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:

FTP 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 "When a file is added or modified" doesn't pick up files over 50MB if the content is asked for. If files over 50MB should be processed with retrieving the content, the trigger "When a file is added or modified (properties only)" can be used followed by the "Get file content" operation.

Requirements

FTP connector requires the following commands to be enabled on FTP server as the implementation for various actions use these commands:

  • APPE
  • DELE
  • RETR
  • MDTM
  • SIZE
  • LIST
  • RENAME
  • STOR

Create File operation behavior

The behavior depends on the Allow chunking option in the action settings and the size of a file being created:

  • If the Allow chunking option is enabled:
    • If the file size is equal or less than 50MB the connector uploads the file within a single request using the original file name, and the file is being locked while uploading.
    • If the file size is greater than 50MB the connector creates the file with the following name format: <file name>.<new guid>.ms.partial and uploads it within multiple requests. Once the last chunk is uploaded, the connector renames the file to the original file name.
  • If the Allow chunking option is disabled:
    • The connector uploads the file within a single request using the original file name, and the file is being locked while uploading.

Creating a connection

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

Name Type Description
Server Address string

Server Address

User Name string

User Name

Password securestring

Password

FTP Server Port int

FTP Port Number (example: 21)

Enable SSL? bool

Enable SSL? (True/False)

Binary Transport? bool

Enable Binary Transport? (True/False)

Disable Certificate Validation? bool

Disable Certificate Validation? (True/False)

Close connection after request completion bool

Close FTP connection everytime after request completes? (True/False)

Throttling Limits

Name Calls Renewal Period
API calls per connection90060 seconds

Actions

Copy file

This operation copies a file to an FTP 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

This operation creates a file. 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

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 the content of a file.

Get file content using path

This operation gets the content of a file using the file path.

Get file metadata

This operation gets the metadata for a file.

Get file metadata using path

This operation gets the metadata of a file using the file path.

List files in folder

This operation gets the list of files and subfolders in a folder.

List files in root folder

This operation gets the list of files and subfolders in the root folder.

Update file

This operation updates a file. 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

This operation copies a file to an FTP 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 url
source True string

Url to source file

Destination file path
destination True string

Destination file path, including target filename

Overwrite?
overwrite boolean

Overwrites the destination file if set to 'true'

Returns

Blob metadata

Create file

This operation creates a file. 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

Select a folder

File name
name True string

Name of the file

File content
body True binary

Content of the file

Returns

Blob metadata

Delete file

This operation deletes a file.

Parameters

Name Key Required Type Description
File
id True string

Select a 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 the content of a file.

Parameters

Name Key Required Type Description
File
id True string

Select a 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

This operation gets the content of a file using the file path.

Parameters

Name Key Required Type Description
File path
path True string

Select a 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 the metadata for a file.

Parameters

Name Key Required Type Description
File
id True string

Select a file

Returns

Blob metadata

Get file metadata using path

This operation gets the metadata of a file using the file path.

Parameters

Name Key Required Type Description
File path
path True string

Select a file

Returns

Blob metadata

List files in folder

This operation gets the list of files and subfolders in a folder.

Parameters

Name Key Required Type Description
Folder
id True string

Select a folder

Returns

List files in root folder

This operation gets the list of files and subfolders in the root folder.

Returns

Update file

This operation updates a file. 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

Select a file

File content
body True binary

Content of the file

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.

When a file is added or modified (properties only)

This operation triggers a flow when one or more files are 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.

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.

Parameters

Name Key Required Type Description
Folder
folderId True string

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

This operation triggers a flow when one or more files are 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.

Parameters

Name Key Required Type Description
Folder
folderId True string

Select a folder

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.