Input SFTP/FTPS

This task can be found in the Plug-in Bar, under the Input tasks group.

The Input SFTP/FTPS task retrieves files from a secure FTP site through an encrypted connection. Masks are typically used to select multiple files to be retrieved from the server.

This plugin uses the OLE Automation API of the WinSCP project. The WinSCP API 5.21 is installed with Workflow as of version 2022.2. The latest version of the API can also be installed manually and registered for use as described on WinSCP's website: https://winscp.net/eng/docs/library_install#registering.

Input

The Input SFTP/FTPS plugin connects to the specified FTP server and path and retrieves all files corresponding to the specified mask. These files may be of any format, even formats that are not readable by OL Connect Workflow.

By default, the input SFTP/FTPS plugin checks the information on the server every 4 seconds (on process activation). The Polling Interval can be changed in the process properties (see Process properties).

Processing

The plugin opens and closes a connection to the server for every file to download.

Each file captured by the input is sent down through the process, one at a time. When the file is finished, the process goes back to the input which feeds another file down, as long as there are files in the folder that match the mask. Once all the files are gone, the process ends.

Downloaded files are automatically deleted on the server.

Note that if the plugin is not set to automatically accept the certificate returned by the FTP server, it only downloads files from the server if the server's RSA fingerprint defined in the task's properties corresponds to the server's certificate.

How to get the server's fingerprint

To get the server's fingerprint, run the plugin once in debug mode with an empty fingerprint value. The server's fingerprint will be written to the message log, from which you can copy it to the plugin's field.

fingerprint_in_messages_pane

Output

The output of this task is a series of individual files, one after the other. These files are not modified in any way from when they are captured from the source FTP server.

Job Information definitions

  • %1 - File name: The name of the file as it was retrieved from the server.
  • %2 - File path: The FTP folder from which the file was retrieved (relative to the user's root folder).
  • %3 - Size: The size of the downloaded file.
  • %4 - Last write time: The time the file was last written to the server.
  • %5 - File permission: The file permission e.g. read/write, for the user.
  • %6 - Owner: Defines the owner of the file.
  • %7 - Group: The group the file belongs to.

Note: Which job information variables are populated depends on what information is provided by the server.

Task properties

General Tab

  • Server settings
    • Url: Enter the url of the FTP server to poll.
    • Username: Enter the name of a user account on the server.
    • Password: If the above account is password protected, enter the password here.
    • Protocol
      • SFTP: Select if the FTP server uses SFTP (SSH).
      • FTPS: Select if the FTP server uses FTPS (SSL/TSL)
      • FTPS connection mode: These settings are only relevant for the FTPS protocol.
      • Port number: Set to use a specific port number. Note: There is no validation to ensure the port is available. It is the user's responsibility to ensure the selected port is available and not being monitored by another application or another OL Connect Workflow task.
    • Accept all certificates: Check this option to automatically accept the certificates returned by the FTP server. Otherwise, in order for a connection to work, the server's fingerprint is needed.
    • Fingerprint: The RSA fingerprint of the server. Files are only downloaded from the remote server if the fingerprint corresponds to the server's certificate. See How to get the server's fingerprint.
  • Remote File Options
    • Directory: Enter the path of the folder to poll on the FTP server. Sub-folders are not scanned recursively.
      If this box is left empty, OL Connect Workflow will poll the root directory.

      Note: The given directory will be looked up from the user's home directory. Such a home directory is usually under the server main user directory and generally includes the user’s name. For example, if "/tmp/temp/copy_pending" is entered, it does not point to the "/tmp/temp/copy_pending" directory but to the "/users/username/tmp/temp/copy_pending" directory.

    • Mask: Enter a single file name mask. Multiple entries are not allowed in this box.