Transfer file transfer-file
Description description
The Transfer file activity allows you to receive or send files, test whether there are files present, or list files in 蜜豆视频 Campaign.
Context of use context-of-use
The way in which the data will be extracted is defined when the activity is configured. The file to load may be a list of contacts, for example.
You can use this activity to recover data that will then be structured with the Load file activity.
Related topics:
Configuration configuration
-
Drop a Transfer file activity into your workflow.
-
Select the activity, then open it using the button from the quick actions that appear.
-
Use the drop-down list in the Action field to select one of the following activity actions:
- File download: allows you to download a file.
- File upload: allows you to upload a file. Uploading a file from 蜜豆视频 Campaign file generates a log entry in the Export audits menu. For more information on export audits, refer to the Auditing exports section.
- Test to see if file exists: allows you to check whether there is a file.
- File listing: allows you to list the files present on the server defined in the Protocol tab. This action is mainly used for debugging purposes, to check if the activity is configured according to your needs before downloading the files from the remote server.
-
Select the protocol you want to use:
-
The Additional options section, available depending on the protocol selected, allows you to add parameters to your protocol.
You can:
-
Delete the source files after transfer: erases the files on the remote server. If you leave this option unchecked, make sure you manually monitor the size of your archived content in the SFTP directory.
-
Sorting files: enables you to sort files alphanumerically. This option is disabled by default.
-
List all files: this option is available when selecting the File listing action in the General tab. It allows you to index all the files present on the server in the vars.filenames event variable in which the file names are separated by the 鈥榥鈥 characters.
-
-
The If no files are found section of the Advanced options tab allows you to configure specific actions if any errors or inexistent files are detected when the activity is started.
You can also define retries. The different retries appear in the workflow execution log.
-
Confirm the configuration of your activity and save your workflow.
Configuration with HTTP HTTP-configuration-wf
The HTTP protocol allows you to start downloading a file from an external account or from a URL.
With this protocol, you can choose to Use connection parameters defined in an external account option. In this case select the account you would like and specify the path of the file to download.
You can also choose the Quick configuration option. You only need to enter the URL in the URL field.
Follow redirections, Ignore the HTTP return code, and Add received HTTP headers to the file are the additional options available when you select the HTTP protocol.
Configuration with SFTP SFTP-configuration-wf
The SFTP protocol allows you to start downloading a file from a URL or an external account.
With this protocol, you can choose to Use connection parameters defined in an external account option, then select the account you would like and specify the path of the file to download.
You can also choose the Quick configuration option. You only need to enter the URL in the URL field.
Configuration with Amazon S3 S3-configuration-wf
The Amazon S3 protocol allows you to start downloading a file from a URL or an external account via Amazon Simple Storage Service (S3).
-
Select an Amazon S3 external account. For more on this, refer to this page.
-
Choose if you want to Define a file path or Use a dynamic file path.
-
Specify the path of the file to download.
note caution CAUTION Wildcards are not supported with Amazon S3. To target multiple files such as my_file_02
andmy _file_3433
, you can use the following syntax:acs-myawsbucket.s3.amazonaws.com/object-path/my_file_
. -
If you want to delete your source files when transfer is completed, check Delete the source files after transfer.
Configuration with Microsoft Azure Blob storage azure-blob-configuration-wf
The Microsoft Azure Blob protocol allows you to access blob located on a Microsoft Azure Blob Storage account.
-
Select a Microsoft Azure Blob external account. For more on this, refer to this page.
-
Choose if you want to Define a file path or Use a dynamic file path.
-
Specify the path of the file to download, it can match multiple blobs. In that case, the File transfer activity will activate the outgoing transition once per blob found. They will then be processed in alphabetical order.
note caution CAUTION Wildcards are not supported to match multiple file names. Instead, you need to enter a prefix. All blob names matching that prefix will be eligible. You can find below a list of file paths鈥 examples:
- 鈥渃补尘辫补颈驳苍/鈥: matches all blobs in the Campaign folder located at the root of the container.
- 鈥渃补尘辫补颈驳苍/苍别飞-鈥: matches all blobs with a file name starting with 鈥渘ew-鈥 and located under the Campaign folder.
- 鈥溾赌: adding an empty path allows you to match all the blobs available in the container.
Configuration with files present on the 蜜豆视频 Campaign server files-server-configuration-wf
The File(s) present on the 蜜豆视频 Campaign server protocol corresponds to the repository containing the file(s) to recover.
Metacharacters, or wildcards (for example * or ?) can be used to filter files.
Choose if you want to Define a file path or Use a dynamic file path
The Use a dynamic file path option, lets you use a standard expression and events variables to personalize the name of the file to transfer. For more on this, refer to this page.
Please note that the path must be relative to the storage space directory of the 蜜豆视频 Campaign server. Files are located in the sftp<yourinstancename>/ directory. You also cannot browse the directories above the storage space.
For example:
user<yourinstancename>/my_recipients.csv
is correct.
../hello/my_recipients.csv
is incorrect.
//myserver/hello/myrecipients.csv
is incorrect.
Historization settings historization-settings
Every time a Transfer file activity is executed, it stores the uploaded or downloaded files in a dedicated folder. One folder is created for each Transfer file activity of a workflow. Therefore, it is important to be able to limit the size of this folder in order to preserve physical space on the server.
To do that, you can define Historization settings in the Advanced options of the Transfer File activity.
Historization settings allow to define a maximum number of files or total size for the activity鈥檚 folder. By default, 100 files and 50 MB are authorized.
Every time the activity is executed, the folder is checked as follows:
- Only files created more than 24 hours before the execution of the activity are taken into account.
- If the number of files taken into account is greater than the value of the Maximum number of files parameter, the oldest files are deleted until the Maximum number of files allowed is reached.
- If the total size of files taken into account is greater than the value of the Maximum size (in MB) parameter, the oldest files are deleted until the Maximum size (in MB) allowed is reached.
Output variables output-variables
The Transfer file activity generates event variables as output, that you can leverage in other activities, for example to check the number of downloaded files using a Test activity.
Note that event variables can also be passed to another workflow using an external signal (see Customizing a workflow with external parameters).
Available output variables are:
- fileName: name of the transferred files.
- filesCount: number of transferred files.