sftpGetFile Step
Description:
The Download File workflow step downloads a specified file from an SFTP server and saves it to a local path.
The step uses a configured SFTP connection, identifies the source file using its relative path on the SFTP server, and specifies the local path where the downloaded file should be saved.
The step supports:
- Downloading a file from an SFTP server.
- Selecting a configured SFTP connection.
- Specifying the relative path of the source file.
- Specifying the local destination path.
- Returning a success or failure result.
This step can be used for:
- Retrieving files from external systems.
- Automated SFTP file processing.
- Downloading partner or customer files.
- Importing files into FlowWright workflows.
- Retrieving reports or data exports.
- Downloading documents for subsequent workflow processing.
- Building inbound file-processing workflows.
- Integrating FlowWright with SFTP-based file exchanges.
Inputs
- Select SFTP – The Select SFTP property specifies the configured SFTP connection to use for the download operation.
- Source File Path – The Relative path of the source file to be downloaded. property specifies the relative path of the file on the SFTP server to be downloaded.
- Destination File Path – The Local Path to save the file to the local machine property specifies the local path where the downloaded file should be saved.
Returns
- True – The True return path represents a successful result from the file-download operation.
- False – The False return path represents an unsuccessful result.
Usage:
The Download File step is typically used when a workflow needs to retrieve a file from an SFTP server and make it available locally for further processing.
The source file can be located using its relative SFTP path, while the destination path identifies where FlowWright should save the downloaded file.
The step is particularly useful as an inbound integration point: an external system uploads a file to an SFTP server, and FlowWright downloads it so that subsequent workflow activities can process it.
Typical uses include:
- Downloading customer files.
- Retrieving partner files.
- Importing data files.
- Downloading reports.
- Retrieving documents for processing.
- Supporting automated file exchanges.
- Processing inbound SFTP files.
- Integrating external file repositories with FlowWright.

Typical Workflow Suggestions:
Inbound File Processing
Use Download File as the first file-transfer operation in an inbound processing workflow.
Example:
Detect Incoming File → Download File → Validate File → Process File
This pattern retrieves an externally supplied file so that subsequent workflow activities can process it locally.
Partner File Exchange
Download files delivered by an external partner through SFTP.
Example:
Receive Partner File → Download File → Process Data → Complete
Customer Document Retrieval
Retrieve a customer document from an SFTP location for workflow processing.
Example:
Identify Customer File → Download File → Review Document → Complete
Data Import
Download a data file before importing its contents.
Example:
Download File → Validate CSV → Import Data → Complete
Report Retrieval
Retrieve a report generated by an external system.
Example:
Download File → Process Report → Generate Summary → Notify User
Automated Batch Processing
Download files from an SFTP server as part of a batch-processing workflow.
Example:
Identify Batch → Download File → Process Batch → Complete
External System Integration
Use the step to retrieve files produced by an external application.
Example:
External System → SFTP → Download File → FlowWright Processing
This provides a straightforward file-based integration pattern.
Document Processing
Download a document and pass the resulting local file to downstream workflow activities.
Example:
Download File → Review Document → Approve / Reject
Local Processing
Use Download File when a subsequent activity requires the file to be available on the local machine.
Example:
Download File → Local File Processing → Generate Result
The XML explicitly provides a local destination file path property for the downloaded file.
Failure Handling
Use the False return path to handle an unsuccessful download.
Example:
Download File → True → Process File
↳ False → Log Failure / Retry / Notify Administrator
The step explicitly provides True and False return values.
To use this step, configure SFTP in FlowWright's SFTP Connections.

A sample connection configuration is included below for reference.

Example:
Let’s build and execute the “sftpGetFileDef” example.
- Create a new definition called “sftpGetFileDef” and open the definition in designer mode.
- Drag an “sftpGetFile” step to the canvas.
- Connect the dots between the “Start” and “sftpGetFile” steps, as shown above.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, additional values are available for configuration.
- Click the “sftpGetFile” step to configure its “Required” properties. Provide a name for the step. Select the “SFTP” connection string from the dropdown. Provide the relative file path of the source file to download. Provide the local file path where the file will be stored. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step to view its properties. When the workflow reaches the Download File step, FlowWright uses the selected SFTP connection to retrieve the file at the configured source path and save it to the specified local destination. The workflow then follows the True or False return path according to the result.
Tips:
- Select the correct configured SFTP connection.
- Verify that the selected connection points to the intended SFTP server.
- Ensure that the source file exists at the configured SFTP path.
- Carefully verify the Relative path of the source file to be downloaded.
- Ensure that the SFTP connection has sufficient permission to read the source file.
- Verify that the local destination directory exists and is accessible to the FlowWright environment.
- Carefully verify the Local Path to save the file to the local machine.
- Use workflow Variables when source or destination paths need to be determined dynamically.
- Use meaningful and consistent local file-naming conventions.
- Consider using a dedicated working directory for files downloaded for workflow processing.
- Test the operation with representative files before deploying the workflow.
- Test both the True and False paths.
- Consider adding logging or notification to the False path.
- Consider retry or exception-handling logic when the SFTP server may be temporarily unavailable.
- Avoid hard-coding environment-specific paths when deploying workflows across environments.
- Be careful when dynamically constructing source and destination paths.
- Ensure that downstream activities use the same local path configured by the Download File step.
- Verify that sufficient local storage is available when downloading large files.
- Confirm that the downloaded file is available at the expected local location as part of end-to-end testing.
Notes:
The Download File step is defined in the SFTP category with the internal name sftpgetfile, label "Download file from SFTP server", and display name "Download File".
The step is implemented by FlowWright.Workflow.SFTPGetFile in FlowWright.Workflow.dll and is a Process step with 2 incoming connections and 2 outgoing connections.
The XML defines three configurable properties, all of which are marked as required.
The Select SFTP property uses the ClsSFTPConnections data type, implemented by FlowWright.DataTypes.ClsSFTPConnections.
The sourceFilePath and destinationFilePath properties use the standard string data type, implemented by FlowWright.DataTypes.ClsTextBox.
The step provides two predefined return values: False and True.
Definition Sample:
You may download the sample definition(s) from the link provided and import them into your FlowWright Process Definition.
Note: Verify and complete any missing configuration after importing the sample, including:
- SFTP connection
- SFTP source file path
- Local destination file path
- Environment-specific SFTP settings
- Environment-specific local directories
- Downstream True and False workflow paths
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.