SFTP

Discover more about the SFTP component and how to use it on the Digibee Integration Platform.

SFTP connects to a service that supports the SFTP (Secure File Transfer Protocol or SSH File Transfer) protocol to upload, delete, download, list, or move files.

Parameters

Take a look at the configuration options for the component. Parameters supported by Double Braces expressions are marked with (DB).

Parameter
Description
Default value
Data type

Operation

The operation to be executed: Upload, Delete, Download, List, or Move.

Upload

String

Account #1

Basic or Private key-type account.

N/A

String

Account #2

Basic or Private key-type account.

N/A

String

Host (DB)

Host or IP address to be used for the connection.

ftp.server.com.br

String

Username (DB)

Used only when the account type is Private key. If both Basic and Private Key accounts are set, this parameter will be ignored due to the presence of the Basic account username.

User

String

Port (DB)

Port number. Generally, assumes value 22.

22

Integer

Server Host Key

Specifies any additional algorithms to be supported for the server host key configuration. Each algorithm must be set separately.

N/A

String

Public Key Algorithms

Specifies any additional algorithms to be supported for the public key algorithms configuration. Each algorithm must be set separately.

N/A

String

KEX Algorithms

Specifies any additional algorithms to be supported for the KEX (key exchange) algorithms configuration. Each algorithm must be set separately.

N/A

String

File Name (DB)

Name of the file or full file path (i.e. tmp/processed/file.txt) to the local file.

local-test.pdf

String

Remote File Name (DB)

Remote file name or full file path (i.e. tmp/processed/file.txt) to the remote file.

test.pdf

String

Remote Directory (DB)

Base remote directory, which can be relative (e.g., pub/tmp) or absolute (e.g.,_ /root/pub_). This parameter is mandatory.

Folder

String

Connection Timeout

Time limit for the connection with the server to expire (in milliseconds).

30000

Integer

Overwrite File On Upload

If the option is active, files with conflicting names will be replaced when uploading.

True

Boolean

Fail On Error

If the option is active, the execution of the pipeline with an error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.

False

Boolean

Proxy Enabled

If the option is active, you will be able to set a proxy to establish the connection with the SFTP service.

False

Boolean

Host (Proxy) (DB)

Proxy host. Available if Proxy Enabled is activated.

N/A

String

Port (Proxy) (DB)

Proxy port. Available if Proxy Enabled is activated. Value must be greater than or equal to 80.

N/A

Integer

Use Dynamic Account

When the option is active, the component will use the account dynamically. When deactivated, it will use the account statically.

False

Boolean

Account Name #1

Account name to be set. The name of the account is generated dynamically via the Store Account component.

N/A

String

Account Name #2

Account name to be set. The name of the account is generated dynamically via the Store Account component.

N/A

String

Scoped

When the option is active, the stored account is isolated from other sub-processes. Sub-processes will see their own version of the stored account data. To know more about the Scoped feature, check out the Dynamic Accounts documentation.

False

Boolean

Important information:

  • The SFTP connector uses an implementation library that has disabled by default specific algorithms that are considered unsafe. The Server Host Key, Public Key Algorithms and KEX Algorithms parameters are available for when it's necessary to enable those algorithms to be able to establish a SFTP connection. Although is possible to use this configuration, it's not recommended to use unsafe algorithms.

  • Currently, the Use Dynamic Account, Account Name and Scoped parameters can only be used in Pipeline Engine v2 and are only available in the Restricted Beta phase. To learn more about it, read the article Beta program.

Message flow

Output

When executing a SFTP component using the operations Download, Upload or Move, the following JSON structure will be generated:

{
    "fileName": "picture.png",
    "remoteFileName": "imap-console-client.png",
    "remoteDirectory": "pub/example",
    "success": "true"
}
  • fileName: name of the local file.

  • remoteFileName: path of the remote file or related path of the remote file.

  • remoteDirectory: path of the base remote directory (related or absolute).

  • success: "true" if the operation was successful, "false" if otherwise.

When executing a SFTP component using the List operation, the following JSON structure will be generated:

{
   "remoteDirectory":"pub/example",
   "success":true,
   "content":[
      {
         "file":"file.txt",
         "isDirectory":false,
         "size":1024,
         "permission":"-rwxrwxrwx",
         "flag":14,
         "accessed":"Sat Jan 14 09:21:05 UTC 2023",
         "modified":"Sat Jan 14 09:21:05 UTC 2023"
      }
   ]
}
  • remoteDirectory: path of the base remote directory (related or absolute).

  • success: "true" if the operation was successful, "false" if otherwise.

  • content: list of files in the remoteDirectory.

  • file: name of the file.

  • size: size of the file.

  • isDirectory: if the returned object is a directory, "true" will be shown; if it's a file, "false" will be shown.

  • permissions: a string containing the permission type given to the object.

  • accessed: date of the last access.

  • modified: date of the last change.

  • flag: returns flags, indicating which attributes are present.

The manipulation of files inside a pipeline occurs in a protected way. The files becomes available in a temporary directory that only the pipeline under execution has access to.

To understand how the messages flow work in the Digibee Integration Platform, read the Messages processing documentation.

Last updated