FTP connector methods
Summarize
Summary of FTP connector methods
The FTP connector methods in ServiceNow Yokohama release enable automation actions on an FTP server. These methods require specific parameters to function and allow you to manage files and folders effectively between the FTP server and local drives.
Show less
Before using other methods, SetConfiguration must be executed to set FTP server access details such as URL, username, and password.
Key Methods and Their Uses
- SetConfiguration: Establishes connection settings to the FTP server; mandatory initial step.
- CreateFolder: Creates a folder at a specified path on the FTP server; returns success status.
- DeleteFile: Deletes a specified file on the FTP server; returns success status.
- DeleteFolder: Deletes a specified folder on the FTP server; returns success status.
- DownloadFile: Downloads a file from the FTP server to a local path; optional timeout parameter; returns success status.
- DownloadFolder: Downloads a folder from the FTP server to a local path; optional timeout; returns success status.
- GetFileList: Retrieves a list of files from a specified folder on the FTP server.
- RenameFile: Renames a file on the FTP server; returns success status.
- RenameFolder: Renames a folder on the FTP server; returns success status.
- UploadFile: Uploads a local file to a specified path on the FTP server; returns success status.
- UploadFolder: Uploads a local folder to a specified path on the FTP server; returns success status.
Practical Application for ServiceNow Customers
These FTP connector methods empower you to automate file and folder operations between your local environment and FTP servers directly within ServiceNow workflows. By providing required parameters such as file paths, folder names, and credentials, you can integrate FTP tasks seamlessly into your automation processes.
Expect clear boolean success indicators for actions like creating, deleting, renaming, uploading, and downloading files or folders, enabling robust error handling and process validation.
The FTP connector methods perform various actions on the File Transfer Protocol server as part of an automation. To enable the methods, you must provide appropriate parameters.
SetConfiguration
Sets the File Transfer Protocol server access details. You must execute this method first.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| Url | URL of the File Transfer Protocol | Data in | String | None | Yes |
| Username | Username to access the File Transfer Protocol server. | Data in | String | None | Yes |
| Password | Password to access the File Transfer Protocol server. | Data in | String | None | Yes |
CreateFolder
Creates a folder on the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| FolderName | Path in the File Transfer Protocol server where the folder will be created with the folder name. | Data in | String | None | Yes |
| Return | Returns True if the folder is created, else, returns False. | Data out | Boolean | None | Not applicable |
DeleteFile
Deletes a file in the FTP server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFilePath | Path to the file you want to remove in the File Transfer Protocol server. | Data in | String | None | Yes |
| Return | Returns True if the file is deleted, else, returns False. | Data out | Boolean | Not applicable | Not applicable |
DeleteFolder
Deletes the specified folder in the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFolderPath | Path to the folder in the File Transfer Protocol server including the folder name. | Data in | String | None | Yes |
| Return | Returns True if the folder is deleted, else, returns False. | Data out | Boolean | Not applicable | Not applicable |
DownloadFile
Downloads a file from the File Transfer Protocol server to the local drive.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFile | Path to the file in the File Transfer Protocol and the name of the file. | Data in | String | None | Yes |
| LocalFile | Path in the local drive where the file will be downloaded. | Data in | String | None | Yes |
| TimeOut | Time after which the request to the File Transfer Protocol server times out. | Data in | Integer | None | No |
| Return | Returns True if the file is downloaded, else, returns False. | Data out | Boolean | None | Not applicable |
DownloadFolder
Downloads a folder from the File Transfer Protocol server to the local drive.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFolderPath | Path to the folder in the File Transfer Protocol and the name of the folder. | Data in | String | None | Yes |
| LocalFolderPath | Path in the local drive where the folder will be downloaded. | Data in | String | None | Yes |
| TimeOut | Time after which the request to the File Transfer Protocol server times out. | Data in | Integer | None | No |
| Return | Returns True if the folder is downloaded, else, returns False. | Data out | Boolean | None | Not applicable |
GetFileList
Returns the list of files in a folder in the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFolderPath | Path to the folder in the File Transfer Protocol and the name of the folder. | Data in | String | None | Yes |
| Return | Returns the list of files in the folder. | Data out | String | Not applicable | Not applicable |
RenameFile
Renames a file in the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFilePath | Path to the file in the File Transfer Protocol server and the name of the file. | Data in | String | None | Yes |
| NewNameofFile | Path to the file in the File Transfer Protocol server and the new name of the file. | Data in | String | None | Yes |
| Return | Returns True if the name of the file is changed, else, it returns False. | Data out | Boolean | Not applicable | Not applicable |
RenameFolder
Renames a folder in the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFolder | Path to the folder in the File Transfer Protocol server and the name of the folder. | Data in | String | None | Yes |
| NewNameofFolder | Path to the folder in the File Transfer Protocol server and the new name of the folder. | Data in | String | None | Yes |
| Return | Returns True if the name of the folder is changed, else, it returns False. | Data out | Boolean | Not applicable | Not applicable |
UploadFile
Uploads a file from the local drive to the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| LocalFilePath | Path to the file in the local drive. | Data in | String | None | Yes |
| RemoteFilePath | Path to the location in the File Transfer Protocol server. | Data in | String | None | Yes |
| Return | Returns True if the file is uploaded, else, returns False. | Data out | Boolean | Not applicable | Not applicable |
UploadFolder
Uploads a folder from the local drive to the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| LocalFolderPath | Path to the folder in the local drive. | Data in | String | None | Yes |
| RemoteFolderPath | Path to the location in the File Transfer Protocol server. | Data in | String | None | Yes |
| Return | Returns True if the folder is uploaded, else, returns False. | Data out | Boolean | Not applicable | Not applicable |