Download File with SFTP/FTP
- 14 Sep 2021
- 2 Minutes to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Download File with SFTP/FTP
- Updated on 14 Sep 2021
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
File Transfer Protocol (FTP) is a method for transferring files across a network. While certain FTP servers allow an anonymous connection, the majority require a user name and password for the FTP server when connecting. Downloading a file in Decisions with FTP utilizes the Download step shown in the example below.
Another method for transferring files across a network is the Secure File Transfer Protocol (SFTP). These servers are similarly configured to FTP servers by use of the Download by SFTP step instead. A Flow can be used to download a file from an FTP or SFTP server once the authentication information has been specified.
The following are additional settings the FTP/SFTP Download step has that can be used based on specific situations:
Setting Name | Purpose |
Get Configuration From Data | Allows the FTP Hostname and Authentication credentials to be mapped in from flow data |
File Compression | Compressing the data for network transit, used for very large files |
Proxy Type | Allows the user input their FTP environment proxy settings |
Example (FTP)
Downloading via SFTP?
This example's configuration mirrors the process for SFTP except replace the Download step with Download by SFTP.
In the following example, a Flow will be built to download a file from an FTP server.
- Begin by navigating to a Designer Folder, select CREATE FLOW from the Global Action Bar.
- In the resulting Create Flow dialog, select and name the default Flow [Download with FTP]. Click CREATE to proceed to the Flow Designer.
- In the Flow Designer, drag and connect a Download step to the Start step and connect both outcomes to the End step from the Toolbox > INTEGRATIONS > FTP.In some cases, there may not be a file available for download and connecting both outcomes to the End step allows the Flow to handle this situation by ending.
- Next, navigate to the Properties panel of the Download step.
- Configure FTP > Server > Host with the hostname of the FTP server.
- Configure FTP > Server > Authentication > Username and Password with the credentials for the account that will connect to the FTP server.
- Navigate to the Properties panel > INPUTS > Output File Name field and change the input mapping from Unknown to Constant.
- In the Output File Name value field, enter the name of the file on the FTP server that will be downloaded.
- In the INPUTS > Remote File Path value field, enter the pathname on the FTP server where the files will be downloaded from.This value should be input as a full file path after the hostname; for example, /FileData/exampledoc.txt.
- Next, in the OUTPUTS > Found > file value field, if desired, enter a new name for the file once it has been successfully downloaded.
- Save the Flow.
Debug
- Select Debug from the Top Action Bar.
- Click START DEBUGGING.
- If a file is found in the FTP location denoted in the Flow, it will be downloaded and added to memory and Flow data, not in a local file system. Please navigate to Writing a File to the Local File System for more information on how to locate the downloaded file.
Was this article helpful?