Upload file to SFTP server

Use this step to send file to SFTP server.

Last published at: August 1st, 2023

sftpSendFile Step

Description:

This step sends / uploads file to SFTP server. 

Inputs

  • sftpConnection – Select the SFTP connection from dropdown
  • sourceFilePath – The physical path of file to be uploaded to server. Ex: - C:\Folder1\uploadText.txt
  • destinationFilePath –The relative path of the file to save in SFTP server. Ex: - /folder1
  • relativeFilePath - variable/global to store the relative file path
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

To use this step, configure SFTP in FlowWright SFTP Connections.

 

Example:

Let’s build and execute the “sftpSendFileDef” example.          

  • Create a new definition called “sftpSendFileDef” 
  • Select the definition and click the “design” button
  • Drag a “sftpSendFile” step from the toolbox
  • Connect the dots between the start and “sftpSendFile” step
  • Click on the “sftpSendFile” step to configure its “Settings” properties. Select “SFTP” connection string from the dropdown list. Provide a local path of the source file to be uploaded. Provide a relative path to store the file to be saved on the server.  
  • Click on the “sftpSendFile” step to configure its “Advanced” properties. Provide a variable/global reference to store the relative file path.
  • The “Logging” setting configuration is necessary for documentation and also measure the workflow progress and the percent complete. This is acheived 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 process instance and execute. Render the process instance. Click on the process step to view the properties. The step should send or upload the file to the SFTP server.