# Celonis Product Documentation

###### Getting Started with SFTP

The SFTP modules allow you to monitor file changes in a selected folder/subfolder, upload new files to the desired folder, modify, or delete existing files that are already in a folder, or change file permissions.

Prerequisites

In order to use SFTP with Execution Management System, it is necessary to have an SFTP account.

The module dialog fields that are displayed in bold (in the Execution Management System Action Flow, not in this documentation article) are mandatory!

###### Connecting SFTP to Execution Management System

To connect your SFTP account to Execution Management System you need to enter the target Host and the SFTP credentials (user name and password or user name and key) to the module's Create a connection dialog.

 Connection name Enter the name for your SFTP connection. Host Enter the host name of the SFTP server you want to connect. Port Enter the SFTP server port. E.g. 22 Auth type Select the authorization method you want to use for connecting to the SFTP server. User name and passwordEnter your credentials. User name and keyEnter your user name and the private key/certificate.Upload the private key to use the client-side authorization or upload your certificate (P12, PFX, or PEM file) if you want to use TLS using your self-signed certificate. If you're using the client-side certificate authorization, you can enter your CA certificate here.Execution Management System does not retain or store any data (files, passwords) you provide here. File and password are only used to extract a private key/certificate. For more details about certificates and keys please refer to the Certificates and Keys article.

After entering the connection information, click on the Continue button to establish a connection.

###### Watch Files in a Folder

Returns files with details when a file is created or changed in a specified folder.

 Connection Folder Specify the folder you want to watch. You can specify an absolute path, e.g. /home/user/or a relative path pointing to a specific folder of the logged in user, e.g. ./. Buffer Size [B] Enter the buffer size in bytes. The value defines the size of transferred chunks from the server. Some servers may cause problems or corrupt files when the value is too high. Maximum number of returned files Set the maximum number of files that Execution Management System will work with during one cycle
###### Watch Subfolders in a Folder

Returns folders with details when a folder is created or changed in a specified folder.

 Connection Folder Specify the folder you want to watch. You can specify an absolute path, e.g. /home/user/or a relative path pointing to a specific folder of the logged in user, e.g. ./. Maximum number of returned files Set the maximum number of folders that Execution Management System will return during one cycle.
###### List a folder's content
 Connection Show Select whether you want to retrieve files, folders, or both. Folder Specify the folder you want to list files/folders from. You can specify an absolute path, e.g. /home/user/or a relative path pointing to a specific folder of the logged in user, e.g. ./. Search Enter the search term (e.g. if you want to search for files with the file extension .txt, enter .txt), or enter the name of the file you want to search for. Sort By Select whether you want to sort results by file name, size, last access date, or last modified date. Sort Order Select whether the result should be returned in ascending or descending order. Continue the execution of the route even if the module returns no results If enabled, the Action Flow will not be stopped by this module. Maximum number of returned results Set the maximum number of files/folders that Execution Management System will return during one cycle.
###### Get Files

Lists files from a specified folder.

 Connection Buffer Size [B] Enter the buffer size in bytes. The value defines the size of transferred chunks from the server. Some servers may cause problems or corrupt files when the value is too high. Folder Specify the folder you want to get the files from. You can specify an absolute path, e.g. /home/user/or a relative path pointing to a specific folder of the logged in user, e.g. ./. Search Enter the search term (e.g. if you want to search for files with the file extension .txt, enter .txt), or enter the name of the file you want to search for. Sort By Select whether you want to sort the results by the file name, size, last access date, or last modified date. Sort Order Select whether the result should be returned in ascending or descending order. Continue the execution of the route even if the module returns no results If enabled, the Action Flow will not be stopped by this module. Maximum number of returned results Set the maximum number of files that Execution Management System will return during one cycle.
###### Get a File

Retrieves file details, including a file's data.

 Connection Buffer Size [B] Enter the buffer size in bytes. The value defines the size of transferred chunks from the server. Some servers may cause problems or corrupt files when the value is too high. File Path Enter the path to the file. You can specify an absolute path, e.g. /home/user/file.txt or a relative path pointing to a specific folder of the logged in user, e.g. ./file.txt.
###### Upload a File

Allows you to upload a file to the SFTP server.

 Connection Folder Specify an existing folder as the storage location for the file. You can specify an absolute path, e.g./home/user/or a relative path pointing to a specific folder of the logged in user, e.g. ./. Source File Map the source file from the previous module (e.g. Dropbox > Get File) or enter/map the file name and file data. Permissions Set the desired file/folder permissions. Use the chmod parameters. E.g. 777 or -rwxrwxrwx.For more details about chmod, please refer to the chmod Man Page.
###### Rename a File

Renames a file.

 Connection File Path Enter the path to the file you want to rename. You can specify an absolute path, e.g. /home/user/file.txt or a relative path pointing to a specific folder of the logged in user, e.g. ./file.txt. New file name Enter the new name for the file, including the file extension.
###### Move a File
 Connection File Path Enter the path to the file you want to move. You can specify an absolute path, e.g. /home/user/file.txt or a relative path pointing to a specific folder of the logged in user, e.g. ./file.txt. New Folder Enter the path to the file's new location. You can specify an absolute path, e.g./home/user/or a relative path pointing to a specific folder of the logged in user, e.g. ./.
###### Delete a File
 Connection File Path Enter the path to the file you want to delete. You can specify an absolute path, e.g. /home/user/file.txt or a relative path pointing to a specific folder of the logged in user, e.g. ./file.txt.
###### Update file permissions

Allows you to change permissions of the file.

 Connection File Path Enter the path to the file you want to move. You can specify an absolute path, e.g. /home/user/file.txt or a relative path pointing to a specific folder of the logged in user, e.g. ./file.txt. Permissions Set the desired file permissions. Use the chmod parameters. E.g. 777 or -rwxrwxrwx.Must match pattern /(.?([r-][w-][x-]){3})|[0-7]{3}/.For more details about chmod, please refer to the chmod Man Page.
###### Create a Folder

Creates a new folder in the specified location.

If the folder already exists, the module will throw an error. To continue the flow uninterrupted, attach an error handler route to the module to catch the error and employ the Resume directive to continue the flow.

 Connection Folder Specify an existing folder as the storage location for the new folder. You can specify an absolute path, e.g./home/user/or a relative path pointing to a specific folder of the logged in user, e.g. ./. Folder Name Enter the folder name. Permissions Set the desired folder permissions. Use the chmod parameters. E.g. 777 or -rwxrwxrwx.Must match pattern /(.?([r-][w-][x-]){3})|[0-7]{3}/.For more details about chmod, please refer to the chmod Man Page.
###### Delete a Folder
 Connection Folder Path Specify the path to the folder you want to delete. You can specify an absolute path, e.g. /home/user/ or a relative path pointing to a specific folder of the logged in user, e.g. ./.