SFTP
The SFTP piece in ZBrain Flow provides secure file transfer capabilities, allowing you to interact with remote servers and file systems directly from your workflows. This robust connector enables you to upload, download, create, delete, and manage files and directories on remote servers using the SSH File Transfer Protocol (SFTP). With SFTP integration, you can build automation that securely exchanges files with external systems, back up important data, processes remote files, and maintains organized file structures across different environments—all with enterprise-grade security. This piece is ideal for organizations that need to automate file operations with servers while maintaining strict security and encryption standards.
How to Use SFTP in ZBrain Flow?
Step 1: Select SFTP as Your Connection
Click on the '+' button in the Flow and search for SFTP.
Select SFTP.
Decide on the action you need, then select it. ZBrain Flow provides several options:
Create File from Text – Create a new file with specified content.
Upload File – Upload a local file to the given path.
Read File Content – Retrieve the contents of a file.
Delete File – Remove a file from the remote server.
Create Folder – Make a new directory on the remote server.
Delete Folder – Remove a directory from the remote server.
List Folder Contents – Lists the content of a given folder.
Rename File or Folder – Change the name of a file or directory.
How to Create Remote Text Files
Step 1: Connect to SFTP Server
From the 'Connection' dropdown, click on 'Select a connection' and then 'Create connection'.
When creating a new connection, you need to provide the following:
A descriptive 'Connection Name'
Select the 'Protocol' (SFTP, FTP, or FTPS)
Enter the 'Host' address of your server
Specify the 'Port' number (typically 22 for SFTP)
Enter your 'Username' for authentication
Provide your 'Password' for authentication
Click 'Save' to create the connection.
Step 2: Specify File Location
In the 'File Path' field, enter the complete path where you want to create the file. Example: "/home/user/documents/newfile.txt"
Step 3: Enter File Content
In the 'File content' field, type or paste the text that should be written to the file. This can include plain text, code, structured data, or variables from previous steps.
How to Upload a File to the Given path
Step 1: Connect to SFTP Server
To connect to your SFTP server, follow the first step in the "How to Create Remote Text Files" section above.
Step 2: Specify Remote Destination
In the 'File Path' field, enter the complete path where you want to store the uploaded file. Example: "./myfolder/test.mp3"
Step 3: Select File to Upload
In the 'File content' field, upload or select the file you want to transfer to the server.
How to Retrieve the Contents of a File
Step 1: Connect to SFTP Server
To connect to your SFTP server, follow the first step in the "How to Create Remote Text Files" section above.
Step 2: Specify File Location
In the 'File Path' field, enter the complete path to the file you want to read. Example: "/home/user/documents/existing-file.txt"
How to Remove Files from Remote Servers
Step 1: Connect to SFTP Server
To connect to your SFTP server, follow the first step in the "How to Create Remote Text Files" section above.
Step 2: Specify File to Delete
In the 'File Path' field, enter the complete path to the file you want to remove. Example: "./myfolder/test.mp3"
How to Create Folders on Remote Servers
Step 1: Connect to SFTP Server
To connect to your SFTP server, follow the first step in the "How to Create Remote Text Files" section above.
Step 2: Specify Folder Location
In the 'Folder Path' field, enter the complete path where you want to create the new directory.
Step 3: Configure Creation Options
Toggle 'Recursive' on if you want to create any missing parent directories automatically. Leave this off if you only want the action to succeed when the parent directory already exists.
<userStyle>Normal</userStyle>
How to Remove Folders from Remote Servers
Step 1: Connect to SFTP Server
To connect to your SFTP server, follow the first step in the "How to Create Remote Text Files" section above.
Step 2: Specify Folder to Delete
In the 'Folder Path' field, enter the complete path to the directory you want to remove.
Step 3: Configure Deletion Options
Toggle 'Recursive' if you want to delete the folder along with all its contents (subfolders and files).
How to List the Content of a Given Folder
Step 1: Connect to SFTP Server
To connect to your SFTP server, follow the first step in the "How to Create Remote Text Files" section above.
Step 2: Specify Directory to List
In the 'Directory Path' field, enter the complete path to the folder whose contents you want to list.
How to Rename or Move Items
Step 1: Connect to SFTP Server
To connect to your SFTP server, follow the first step in the "How to Create Remote Text Files" section above.
Step 2: Specify Current Location
In the 'Old Path' field, enter the complete path to the file or folder you want to rename.
Step 3: Specify New Location
In the 'New Path' field, enter the complete path for the new name or location. Note that you can use this action to move items between directories as long as the destination directory already exists.
Last updated