SapotaCorp

File-Drop Automations: SFMC Pattern for Daily Imports

Client drops a CSV on SFTP at 9am some days, 11am others. Scheduled automations end up importing yesterday's file. File Drop is the fix, and here's the sequence we use on production engagements.

Key takeaways

  • File Drop starting source triggers automations when a file arrives on SFTP, not on a schedule. Suits the SFTP source that arrives at unpredictable times (9am Mondays, 11am Tuesdays); scheduled automations end up importing yesterday's file when the new one arrives later than expected.
  • Filename patterns let one automation handle multiple daily files. The pattern customer_*.csv triggers on every file matching the pattern; the automation reads the file, imports the data, archives the file. Without patterns, each file type needs its own automation.
  • File Transfer plus Import File split handles the move-and-process pattern cleanly. File Transfer pulls from external SFTP to SFMC's import directory; Import File parses into the DE. Skipping File Transfer produces "file not found" errors when SFMC tries to import directly from SFTP.
  • Use File Drop instead of Schedule when timing is unpredictable. Use Schedule when the file arrives at a known time. Mixing them on one automation (Schedule with a "check if file exists" step) is harder to maintain and produces operational confusion.
File-Drop Automations: SFMC Pattern for Daily Imports

A logistics engagement we picked up had a daily email run that was breaking once or twice a week, always silently. The job was simple: each morning the client's order management system exported a CSV of customers whose shipments had just dispatched, dropped it to SFTP, and SFMC should import + send a tracking notification.

The broken part: the automation was scheduled at 8:00 AM every day. Most days the file arrived at 8:30 or 9:00. Half the time the automation ran with yesterday's file, half the time it ran and imported nothing. A thousand customers got the wrong tracking email.

The fix is the File Drop Starting Source.

File Drop vs Schedule

File Drop triggers the automation when a new file arrives in a specified SFTP folder, not on a clock. If the client uploads at 11am instead of 8am, the automation fires at 11am. If they upload at 2am, it runs at 2am. No dependency on fixed schedules.

Use File Drop whenever the upload time is not guaranteed. Use Schedule only when you know the upload happens reliably at a fixed time (e.g. SFMC itself runs the upstream job).

The canonical sequence

File Drop Starting Source  (watching /import/shipping/)
  -> Step 1: Import File Activity   (import the CSV into Shipping_Notification_DE)
  -> Step 2: Send Email Activity    (send from Shipping_Notification_DE)

2 steps, runs the moment the file lands, no manual babysitting.

File Transfer vs Import File - the distinction that bites

These are two different Activity types:

  • File Transfer Activity - moves or decrypts a file on SFTP. Use when the file is encrypted (PGP) or needs to be relocated to a different folder.
  • Import File Activity - reads a file from SFTP and writes the rows to a Data Extension in SFMC.

If the file is delivered encrypted, the sequence becomes:

File Drop Starting Source
  -> Step 1: File Transfer Activity  (decrypt the .pgp file)
  -> Step 2: Import File Activity    (import the decrypted CSV into DE)
  -> Step 3: Send Email Activity     (send)

Skipping Step 1 is a common first-engagement mistake. Import File Activity reports "File Not Found" because the .pgp file can't be read directly; the actual decrypted file doesn't exist yet.

Filename patterns and the capitalization trap

File Drop can trigger on either a specific file name or on a filename pattern (with a * wildcard). Always use pattern:

shipping_*.csv     matches shipping_20240115.csv, shipping_20240216.csv, etc.

One afternoon our pipeline stopped running. No alert, no error, just silence. The client's upstream job had changed the file naming from shipping_20240115.csv to Shipping_20240115.csv (capitalized S). File Drop matches case-sensitively. The file landed, the File Drop didn't fire, the automation didn't run.

Two protections:

  1. Document the filename convention in the runbook. Share it with the client team that owns the export job.
  2. Configure a failure notification on the automation. If it doesn't run by 10am on a workday, someone gets paged.

The SFTP folder structure SFMC expects

Every Enhanced SFTP gets three default folders:

/Import    <- Import Activity reads files from here
/Export    <- Data Extract Activity writes files here
/Reports   <- Report scheduling output

Do not delete these. Import Activity defaults to /Import and fails with "File Not Found" if you drop files elsewhere without reconfiguring the Activity.

Each Enterprise account can have one shared SFTP or one SFTP per child account (MID). Confirm which setup the client is running on day one - the folder paths and credentials differ.

Safehouse - where decrypted files live

File Transfer Activity writes decrypted or unzipped output into a restricted area called the Safehouse, not back to the public SFTP folder. Import File Activity reads from the Safehouse in that case.

encrypted file on SFTP
  -> File Transfer Activity (decrypt) -> Safehouse
  -> Import File Activity (read from Safehouse) -> DE

SFMC auto-purges the Safehouse and SFTP after 21 days. SFTP is not long-term storage. Plan accordingly.

Takeaway

File Drop is the right Starting Source for anything where the file arrival time isn't under your control. Pair it with a filename pattern (not a hardcoded name), document the pattern with the upstream team, and add failure notifications so a silent skip becomes a visible alert. Three habits, a class of silent bugs eliminated.


Setting up SFMC data import pipelines? Our Salesforce team designs Automation Studio flows with SFTP, PGP decryption, and monitoring on production engagements. Get in touch ->

See our full platform services for the stack we cover.