You can use IBM App Connect to pass data between one SFTP location and other SFTP locations, and between SFTP and other apps, automatically, in real time.
You can use App Connect with SFTP for transferring all file types with secured communication. Text and binary file types can be transferred or retrieved from one or more SFTP servers that have been connected to App Connect.
Connecting to an SFTP server for file transfer
Before you use App Connect with SFTP, you must connect App Connect to your SFTP server account by providing a set of connection details; typically on App Connect’s Catalog page:
If the SFTP server is in a private network (for example, behind a firewall), you need to create a private network (through a Secure Gateway) for App Connect to access the SFTP server. When you select ‘Connect a network’, youâ€™ll see a set of instructions to create a private network. When youâ€™ve followed the instructions, and youâ€™ve connected to your SFTP server, you can discover the supported objects and actions from the SFTP events and actions section in the Catalog.
For a detailed explanation about how to connect a private network for an SFTP server, see What should I consider first? in the page “How to use IBM App Connect with SFTP”.
A business scenario
Letâ€™s suppose you work as a team developing a product. This product needs installation of software and needs to be tested by the QA team.The product is in the initial phase of development and needs continuous testing. The files to be installed are added to an SFTP server and from there files can be picked up to be installed and tested. The developer should be able to upload the file to the SFTP server, and the QA team should be able to retrieve the file; so youâ€™re using a SFTP server for secure file transfer and management. To help process the product installation in a serialized and secured way, youâ€™re using the SFTP server for processing.
The following steps give a basic example of creating a flow in App Connect for the scenario:
- To begin, create an event-driven flow, with a Scheduler as the trigger for the flow. The scheduler is configured so that every morning new files get retrieved from the SFTP Developer location.
- Click the + icon for the first action in the flow. Under Applications -> SFTP, select the connected account for the SFTP server (for the Developer location) to retrieve the file content.
Expand Files, and then select ‘Retrieve file content’ to retrieve the binary content of the file. The ‘Retrieve file content’ action node is added to the flow. Configure the action by using the fields provided:
- “Type of file”: Select “Binary”
- “Source Path”: Enter the path for the location from where the file content has to be retrieved. In this case, it is the Developer file location where the installation file gets added by the developer.
- Again click the + icon (for the next action). Under Applications -> SFTP, select the connected account for the SFTP server (for the QA location) to create or add a file to the required location for the QA team to access the file.
Expand Files, and then select ‘Create file’ to add the file to the required location. The action node is added to the flow. Configure the action by using the fields provided:
- “Type of file”: Select “Binary”
- “Source Path”: Enter the path for the location to where the file has to be added. In this case, it is the QA file location where the installation file gets added for the QA team to test.
- “File Data”: Map the File Data field from the ‘Retrieve file content’ Response as shown in the second image below.
- Finally, start the flow. You can test the flow by adding a file to the Developer location and the file gets added to the destination folder (of the QA location).
Weâ€™d love to hear from you. Why not share some of your use cases with us or send us any other comments?