File Transfer Activity Rundown
The File Transfer Activity in Salesforce Marketing Cloud (SFMC) Automation Studio is used for moving, unzipping, encrypting, and decrypting files between SFMC’s Secure FTP (SFTP) and its Safehouse (temporary encrypted storage) or other external systems. It plays a crucial role in automating data imports and exports.
Why Use File Transfer Activity?
- Automate Data Exchange between SFMC and external systems (CRM, data warehouses, third-party applications).
- Ensure Security with PGP encryption/decryption to protect sensitive customer data.
- Manage File Format & Structure by unzipping compressed files before importing.
- Rename or Move Files to proper locations for further processing.
File Transfer Activity Functions
Function | Description | Use Case |
Move a File | Transfers files between FTP locations (e.g., from Safehouse to SFTP) | Moving processed files to an external system |
Unzip a File | Extracts .zip files to make them usable in SFMC | Unzipping customer data files before import |
Encrypt a File | Uses PGP Encryption to secure files before transfer | Sending encrypted files to external systems |
Decrypt a File | Uses PGP Decryption to unlock encrypted files before processing | Receiving and processing sensitive customer data |
Step-by-Step: How to Set Up File Transfer Activity
Step 1: Access File Transfer Activity
- Go to SFMC → Open Automation Studio.
- Click on Activities → Select File Transfer.
- Click Create Activity → Choose the action (Move, Unzip, Encrypt, Decrypt).
Step 2: Choose the File Transfer Type
Move a File
- Transfers files from the Safehouse to SFTP (or vice versa).
- Ensures that data files are available in the correct folder.
Unzip a File
- If the file is compressed (.zip), this activity extracts its contents.
- Required before processing CSV files in Import File Activity.
Encrypt a File (PGP Encryption)
- Protects sensitive files before sending them externally.
- Uses Public PGP Keys to encrypt data.
Decrypt a File (PGP Decryption)
- Unlocks encrypted files before SFMC can process them.
- Uses Private PGP Keys stored in SFMC.
Step 3: Configure File Transfer Activity
File Source & Destination
- Select the source folder:
Safehouse (SFMC’s temporary secure storage).
SFTP Directory (external storage for files).
- Set the destination folder:
- If moving a file, choose the target SFTP location.
- If unzipping, select where extracted files will be stored.
File Name Patterns
- Use wildcards (* or ?) for dynamic file names:
- customer_data_*.csv → Matches any file starting with customer_data_.
- sales_report_2025-??-??.csv → Matches date-based file names.
Select Encryption/Decryption (if needed)
- If encrypting, select the PGP Public Key.
- If decrypting, choose the PGP Private Key uploaded in SFMC.
Save & Run
- Click Save → Add the File Transfer Activity to an Automation.
How File Transfer Activity Works in an Automation?
Automation Step | Activity Type | Purpose |
1️.File Drop / External Upload | External Process | A file is placed in SFMC FTP |
2️.File Transfer Activity | Move / Decrypt / Unzip | Prepares file for processing |
3️.Import File Activity | Import to Data Extension | Loads data into SFMC |
4️.SQL Query Activity | Data Processing | Cleans and segments data |
5️.Send Email Activity | Messaging | Triggers personalized campaigns |
Common Use Cases for File Transfer Activity
- Import Encrypted Customer Data (PGP Decryption + Import File Activity)
Scenario: A company receives encrypted customer data files daily from an external CRM. The data must be decrypted, imported, and processed automatically.
Solution:
- File Transfer Activity → Decrypts the file.
- Import File Activity → Loads the data into a Data Extension.
- SQL Query Activity → Cleans & segments data for personalization.
- Export & Securely Transfer Reports (Data Extract + PGP Encryption + File Transfer)
Scenario: A company wants to automate the export of campaign performance reports and securely send them to an external SFTP.
Solution:
- Data Extract Activity → Generates the report in .csv.
- File Transfer Activity → Encrypts it using PGP.
- File Transfer Activity → Moves the encrypted file to external FTP.
- Process & Import a Zipped File (Unzip + Import File Activity)
Scenario: A partner sends a daily zipped file containing new customer records, and it needs to be imported into SFMC.
Solution:
- File Transfer Activity → Unzips the .zip file in the Safehouse.
- Import File Activity → Imports the extracted .csv file.
- SQL Query Activity → Processes & segments data.
Best Practices for File Transfer Activity
- Use Safehouse for Sensitive Data → The Safehouse is a temporary encrypted storage area, ideal for PGP decryption before processing data.
- Schedule Automations Wisely → Ensure the file is available in the FTP before running the File Transfer Activity (use “File Drop Automations” for real-time processing).
- Use Wildcards for File Names → This prevents failures due to timestamp variations (e.g., customer_data_*.csv).
- Monitor FTP Failures → Set up error notifications in Automation Studio in case the file is missing or not processed correctly.
- Manage Encryption Keys Properly → Ensure that PGP keys are updated regularly for security compliance.
Conclusion:
The File Transfer Activity in SFMC is a powerful tool for automating file-based workflows, including importing customer data, exporting reports, and securing sensitive information. Whether you’re moving files, unzipping compressed data, or encrypting records, this activity ensures seamless data management in Automation Studio.