SFTP
Procedures and concepts for the SFTP integration.
Overview
SFTP (Secure File Transfer Protocol) provides secure file transfer capabilities for safe data exchange. This integration enables automated file uploads, downloads, directory management, and secure data transmission workflows. Ensure secure file operations and maintain data integrity during transfers.
Prerequisites
1. Required Books
The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:
SFTP
How to Add the Book(s)
Go to Books → All Books.
Search for the name of the book and click on it.
Click on Install or Add Connection to add the book to your agent.
If adding a connection, you'll be prompted for connectivity details.
Connectivity
This section outlines the available methods for connecting to the Book, along with the required configuration details for each.
Connect using Hostname, Port, Username and Password
Connect to an SFTP server.
Hostname
The hostname of the SFTP server.
text
Port
The port of the SFTP server.
text
Username
The username for authentication.
text
Password
The password for authentication.
sensitive
Configuration
The following table details all the available configuration options for this book.
connection timeout
Get the connection timeout value in seconds.
number
(no default)
max retry attempts
Get the value of the attempts.
number
(no default)
base retry delay
Get the value of the base delay.
number
(no default)
Configuration can be set or retrieved as shown in the following examples:
Procedures
to copy an item to a folder
Copy an item to a folder
Input Concepts
item
The item (file or folder) to copy
sftp file reference or sftp folder reference
Yes
(no default)
conflict behavior
The behavior to use on conflict scenarios. It should be one of the following values: ('fail', 'replace', 'rename')
text
No
fail
Examples
Copy a file on the SFTP server
to create a (folder) in another folder
Create a (folder) in another folder
Input Concepts
folder name
The name of the (folder) to create
text
Yes
(no default)
conflict behavior
The behavior to use on conflict scenarios. It should be one of the following values: ('fail', 'replace', 'rename')
text
No
fail
Output Concepts
Examples
Create a directory on the SFTP server
to delete an item
Delete an item (file or folder)
Input Concepts
item
The item (file or folder) to delete
sftp file reference or sftp folder reference
Yes
(no default)
Examples
Delete a file from the SFTP server
to download a file
Download a file
Input Concepts
Output Concepts
answer
the file as an IO object
file
Examples
Download a file from the SFTP server
to get a (folder) at a path
Get a reference to a folder.
Input Concepts
path
The path to the folder
text
Yes
(no default)
Output Concepts
Examples
Get a folder at a path.
to get a (root folder)
Get a reference to the root folder.
Output Concepts
Examples
Get the root folder
to get some (folder's items)
Get items from a folder.
Input Concepts
Output Concepts
folder's items
a list of Items (file or folder) containing the items in the folder
sftp file reference or sftp folder reference
Examples
List files in a directory on the SFTP server
List files in a directory on the SFTP server with a filter expression
to move an item to a folder
Move an item to a folder
Input Concepts
item
The item (file or folder) to move
sftp file reference or sftp folder reference
Yes
(no default)
conflict behavior
The behavior to use on conflict scenarios. It should be one of the following values: ('fail', 'replace', 'rename')
text
No
fail
Examples
Move a file on the SFTP server
to rename an item to a name
Rename an item (file or folder) to a given name
Input Concepts
item
The item (file or folder) to rename
sftp file reference or sftp folder reference
Yes
(no default)
name
The new name of the item
text
Yes
(no default)
conflict behavior
The behavior to use on conflict scenarios. It should be one of the following values: ('fail', 'replace', 'rename')
text
No
fail
Examples
Rename a file on the SFTP server
to upload a (file) to a folder
Upload a file to a folder
Input Concepts
file
The file to upload
file
Yes
(no default)
file name
The name of the file to upload
text
Yes
(no default)
conflict behavior
The behavior to use on conflict scenarios. It should be one of the following values: ('fail', 'replace', 'rename')
text
No
fail
Output Concepts
Examples
Upload a file to the SFTP server
Concepts
Sftp file reference
Contains all information required to identify a file within a storage system
path
The path of the file
text
file_name
The name of the file
text
size
The size of the file in bytes
optional[number]
extension
The file extension
optional[text]
type
The type of the SftpItem
optional[text]
name
The name of the item
optional[text]
Sftp folder reference
Contains all information required to identify a folder within a storage system
path
The path of the folder
text
folder_name
The name of the folder
text
type
The type of the SftpItem
optional[text]
name
The name of the item
optional[text]
Last updated
Was this helpful?

