Sync SFTP files to Salesforce on schedule

Recipe ToolsMarketingFile TransferData ParserUtilitiesCRMDeveloper ToolAPI IntegrationDatabase

What it does

When the clock triggers every 5 minutes, this automation lists files from an SFTP server and filters out hidden files. It parses each CSV, syncs contract data to Salesforce, and sends results to someone with the specified email.

Who it's for

Sales operations teams who need to keep Salesforce contracts in sync with SFTP files without manual uploads.

How teams use this

Sync contracts from SFTP daily

Run the automation on a schedule to pull contract CSVs from SFTP and push them into Salesforce without manual work. The team stays current with contract data.

Filter contracts by region before sync

Add a condition to check a region column in the CSV and only sync contracts for a specific area to Salesforce. This keeps Salesforce focused on relevant records.

Alert on sync errors

Include a check after the Salesforce sync step to catch failed records and send a notification to the team. Errors are caught and addressed right away.

Archive processed files in SFTP

Add a step to move each CSV to an archive folder in SFTP after it syncs to Salesforce so the source folder stays clean and prevents duplicate syncs.

How it works

  1. Run every 5 minutes. The automation starts on a 5-minute schedule and checks for new files to process from the SFTP server.
  2. List files in SFTP folder. Retrieve all files from the SFTP server and filter the list to skip hidden files that start with a dot so only valid CSVs are processed.
  3. Parse each CSV file. For each file, parse the CSV content with Csv Parser to extract contract data rows that will be sent to Salesforce.
  4. Sync contracts to Salesforce. Create or update contract records in Salesforce with the parsed data from each CSV file so the records stay current.
  5. Build result list for email. Compile the synced contracts into a list and send it to someone with the specified email so they see what was processed.