SFMC Blog #1 : How to Transfer Files from Google Cloud Storage to Salesforce Marketing Cloud

Transferring files from Google Cloud Storage (GCS) to Salesforce Marketing Cloud (SFMC) requires using SFTP, because Marketing Cloud does not natively connect to GCS.

Transferring files from Google Cloud Storage (GCS) to Salesforce Marketing Cloud (SFMC) requires using SFTP, because Marketing Cloud does not natively connect to GCS.

The standard flow is:

Google Cloud Storage → SFTP Upload → Marketing Cloud Automation Studio Import

Step 1: Obtain Marketing Cloud SFTP Credentials

In Salesforce Marketing Cloud:

Navigate to Setup → Data Management → FTP Accounts

Retrieve:

SFTP hostname

Username

Port (typically 22)

Configure SSH key authentication (recommended over password)

These credentials will be used to upload files from GCP to Marketing Cloud.

Step 2: Prepare the File in Google Cloud Storage

In Cloud Storage:

  1. Upload or generate the file inside your bucket
    Example:
    gs://outbound-bucket/customer_export_20260224.csv
  2. Validate:
    • File format: CSV (most common)
    • Encoding: UTF-8
    • Correct delimiter (comma, pipe, etc.)
    • Header row (if required by Import Definition)

Step 3: Transfer File from GCS to Marketing Cloud

Because SFMC cannot directly pull from GCS, you must push the file via SFTP.

Recommended Method: Cloud Function or Cloud Run (Automated)

Using Google Cloud Platform serverless services:

Process:

  1. Download file from GCS
  2. Connect to SFMC SFTP using SSH
  3. Upload file to the appropriate folder

You can:

  • Trigger on file creation in GCS
  • Schedule via Cloud Scheduler
  • Run manually if needed

This method is scalable and requires minimal infrastructure maintenance.

Step 4: Configure Import in Marketing Cloud

Once the file is on the Enhanced FTP:

  1. Go to Automation Studio
  2. Create a File Import Activity
  3. Configure:
    • File location (FTP folder)
    • File naming pattern
    • Target Data Extension
    • Import type (Overwrite / Add Only / Add & Update)
  4. Add the Import Activity to an Automation
  5. Schedule it to run after file transfer completes

Step 5: Add Scheduling and Monitoring

To ensure reliability:

  • Use Cloud Scheduler to trigger the transfer
  • Add logging and retry logic
  • Ensure Marketing Cloud import runs after the file upload
  • Monitor file size and row counts for validation

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top