"Create directory" node
The Create directory node allows you to send a request to your SFTP server to create a new folder. This node can be used in workflows that export data to Synerise, so the export can be preceded by defining a new folder in your resources.
Node configuration
- In the Server field, enter the URL of the server.
- In the Port field, set the port. The default value is the most commonly used SFTP port.
- In the Path to directory field, provide a path where your new directory will be created (for example:
/home/file-directory/
). - In the Directory name field, enter the name of the directory you want to create.
Don’t use spaces and special characters. - In the Authentication section, define how you will confirm your credentials in a request for creating a directory in your SFTP. You can choose from:
- Anonymous - Select this option if accessing your SFTP does not require authentication.
- Password - Select this option to authenticate by providing a login and a password.
- Public key - Select this option to authenticate with a public SSH key which is issued for this integration (you can download such key from the pop-up and add it to the server configuration). When you choose this option:
- From the pop-up that appears, copy the public key.
- Add the key to your SFTP server’s list of known keys.
- Test the connection by clicking Check connection.
- Confirm the settings by clicking Apply.
Example of use
You can use the Create directory node in a workflow that exports customer data from a selected segmentation to SFTP. The customer data will be extracted with the Get Profiles node. This workflow will be triggered only once and before it sends a file with extracted customer data, it will send a request to your SFTP to create a directory whose name will be a date of the export.
- Start the workflow with the Scheduled Run node. In the configuration of the node, set the Run trigger to one time. Select the Immediately tab.
- To retrieve customers’ data for the workflow, as the next node, select Synerise > Get Profiles. In the configuration of the node:
- Select a segmentation from which you want to extract customers’ data. In this example, it’s a segmentation of loyalty program prospects.
- Select the customer attributes to be exported. In this example, the email address and email marketing agreement status.
- The next step is creating a new directory in your SFTP. For this purpose, select SFTP > Create directory. In the configuration of the node, in the Directory name, you can use the following Jinjava code to use a date of launching the node as the directory name.
The Jinjava code returns the date in the following format:{{ timestamp|timestamp_to_time|datetimeformat('%d-%m-%Y', tz="UTC" ) }}
08-03-2023
. - The next step is sending the customer data retrieved from the Get Profiles node. For this purpose, select SFTP > Send File. In the configuration of the node, fill out the configuration form.
- Add the End node.
Result:The configuration of the workflow that creates a directory in SFTP