SFTP allows the establishment of a connection to a service that supports the SFTP (Secure File Transfer Protocol or SSH File Transfer) protocol and the execution of the upload, delete, download, list or move commands.

Take a look at the configuration parameters of the component:

  • Operation: operation to be executed, which can be upload, delete, download, list or move

  • Account: for the component to make the authentication to a SFTP service, it's necessary to use a BASIC or PRIVATE KEY-type account. This parameter supports Double Braces.

  • Host: name of the host or IP address to make the connection. This parameter supports Double Braces.

  • User Name: must be used only wjem the account type is PRIVATE KEY. This parameter supports Double Braces.

  • Port: port number - generally 22. This parameter supports Double Braces.

  • File Name: name of the file or complete path (full file path) to the file. This parameter supports Double Braces.

  • Remote File Name: name of the remote file or related path (eg.: tmp/file.txt) to the remote file. This parameter supports Double Braces.

  • Remote Directory: mandatory field. Base remote directory, which can be related (eg.: pub/tmp) or absolute (eg.: /root/pub). This parameter supports Double Braces.

  • Connection Timeout: time for the connection with the server to expire (in milliseconds)

  • Overwrite File On Upload: if "true", in case of files with conflicting names, the file will be replaced during the upload

  • Fail On Error: if "true", the pipeline with error execution will be suspended; if "false", the pipeline execution continues, but the result will show a false value for the success property

  • Proxy Enabled: if "true", it allows the configuration of a proxy to establish the connection with the SFTP service

  • Host: proxy host. This parameter supports Double Braces.

  • Port: proxy port. This parameter supports Double Braces.

IMPORTANT: notice some of the parameters above support Double Braces. To understand how this language works, read our article by clicking here.

Messages 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 remore 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 FTP component using the list operation, the following JSON structure will be generated:

{
"remoteDirectory": "pub/example",
"success": true,
"content": [
{
"isDirectory": false,
"size": 1024,
"permission": "drwx------",
"flag": 14,
"accessed": "Sun Nov 08 16:36:32 BRT 2020",
"modified": "Sun Nov 08 16:36:32 BRT 2020"
}
]
}

  • 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

IMPORTANT: 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 Platform, click here and read our article.

Did this answer your question?