To interact with a single Secure File Transfer Protocol (SFTP) server as part of a chain, add a step that includes an SFTP connection command.
Note: To use this connector, your organization needs access to its own SFTP server. Workiva does not host or provide SFTP servers.
To enable these commands, an IT admin first configures an SFTP connection.
Delete
To delete files and folders on the SFTP server, use a Delete command.
Properties
Property |
Detail |
File(s) |
Enter the files and folders to delete. To match multiple files and folders, use the wildcard character * . |
Skip folders |
To ignore folders that match the File(s) specified, check this box. |
Recursive |
To delete the specified folders and their entire contents, check this box. |
Outputs
Output |
Output type |
Deleted files |
JSON |
Deleted folders |
JSON |
All items deleted |
JSON |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
2 |
Error |
Task failed |
6 |
Error |
Directories marked for deletion weren't set to be skipped, and recursive wasn't set |
Download file
To download a file from the SFTP server, use a Download File command.
Properties
Property |
Detail |
File |
Enter the name of the file to retrieve from the SFTP server.
Note: If using this command with a group iteration, use the Remote Files Iteration variable of the command iterator to identify the file.
|
Parallel download |
To enable parallel downloads, such as for a large file, check this box. |
Number of threads |
If you select Parallel Download, select how many threads to run in parallel. If unsure, leave the default value of 3. |
Outputs
Output |
Output type |
Downloaded file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
2 |
Error |
Task failed |
Get
To retrieve files from the SFTP server, use a Get command.
Properties
Property |
Detail |
File(s) |
Enter the files to retrieve. To match multiple files, use the wildcard character * . |
Destination |
Enter the destination for the files. To retrieve multiple files, enter a directory. |
Outputs
Output |
Output type |
Retrieved files |
JSON |
Retrieved files (Text) |
String |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
2 |
Error |
Task failed |
6 |
Error |
Directories weren't skipped and marked for deletion, and recursive wasn't set |
List directory
To list the files in a directory on the SFTP server, use a List Directory command.
Properties
Property |
Detail |
Directory |
Enter the directory with the contents to list. To list multiple files and folders within the directory, use the wildcard character * .
Note: If using this command to list files for a later iterative Download File command, include the name of the file to download. If the name changes with each iteration, such as based on a date or timestamp, include the wildcard character * .
|
Detail level |
Select the level of detail to show about the files and folders:
- Short, for only the names of the files and folders
- Full, for the names and additional information including ownership and permissions
|
Outputs
Output |
Output type |
Remote files |
JSON |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
2 |
Error |
Task failed |
5 |
Error |
Specified directory wasn't found |
Make directory
To create a new directory on the SFTP server, use a Make Directory command.
Properties
Property |
Detail |
Directory |
Enter the directory to create on the SFTP server. |
Recursive |
To create the entire path of the directory if it doesn't exist, check this box. |
Output
None
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
2 |
Error |
Task failed |
4 |
Error |
Error creating the specified directory |
6 |
Success |
Directory already exists |
Move
To move files on the SFTP server, use a Move command.
Properties
Property |
Detail |
File(s) |
Enter the files to move. To match multiple files and folders, use the wildcard character * . |
Destination |
Enter the destination for the files. To move multiple files, enter a directory. |
Outputs
Output |
Output type |
Moved files |
JSON |
Moved files (text) |
String |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
2 |
Error |
Task failed |
4 |
Error |
When moving multiple files, destination must be an existing directory |
5 |
Error |
No files founds with the specified source files |
Put
To upload files to the SFTP server, use a Put command.
Properties
Property |
Detail |
File(s) |
Enter the files to upload. To match multiple files and folders, use the wildcard character * . |
Destination |
Enter the destination for the files. To upload multiple files, enter a directory. |
Outputs
Output |
Output type |
Remote files |
JSON |
Remote files (Text) |
String |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
2 |
Error |
Task failed |
6 |
Error |
Directories weren't skipped and marked for deletion, but recursive wasn't set |