FTP connector methods
Summarize
Summary of FTP Connector Methods
The FTP connector methods allow users to perform various actions on a File Transfer Protocol (FTP) server as part of automations within ServiceNow. These methods require specific parameters to be set in order to function properly.
Show less
Key Features
- SetConfiguration: Configures the FTP server access details. This method must be executed first.
- CreateFolder: Creates a folder on the FTP server.
- DeleteFile: Removes a specified file from the FTP server.
- DeleteFolder: Deletes a specified folder from the FTP server.
- DownloadFile: Downloads a file from the FTP server to a local drive.
- DownloadFolder: Downloads a folder from the FTP server to a local drive.
- GetFileList: Retrieves a list of files in a specified folder on the FTP server.
- RenameFile: Renames a specified file on the FTP server.
- RenameFolder: Renames a specified folder on the FTP server.
- UploadFile: Uploads a file from a local drive to the FTP server.
- UploadFolder: Uploads a folder from a local drive to the FTP server.
Key Outcomes
By utilizing these methods, ServiceNow customers can efficiently manage files and folders on their FTP servers, facilitating seamless integration and automation processes. Each method returns a Boolean value indicating success or failure, allowing for easy error handling and validation in automation workflows.
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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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? | Notes |
|---|---|---|---|---|---|---|
| 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 |