Import leads from CSV via SFTP into Marketo

UtilitiesMarketing

What it does

When a new file lands in a BrickFTP folder on a schedule, this automation downloads the CSV and parses each row. It searches Marketo for matching leads, creates new ones when none exist, and logs any errors that occur.

Who it's for

Marketing operations teams who load lead lists into Marketo from SFTP without manual uploads.

How teams use this

Load weekly lead exports into Marketo

Run this automation every week to import a CSV of new leads from an external source via SFTP. Duplicates are skipped and new leads are added to Marketo automatically.

Sync leads from a partner SFTP server

Point the FTP folder to a partner's SFTP server so their lead file is imported on schedule. The flow stays the same and only the source folder changes.

Add lead scoring on import

Extend this automation to set a lead score or custom field in Marketo based on data in the CSV, such as company size or industry. Include a condition to check the field value before creating the lead.

Alert the team on import failures

Add a Slack notification step so the team is notified when the import completes with errors. Include the error log so they know which leads failed to load.

How it works

  1. Detect new file in BrickFTP. A new CSV file arrives in the designated BrickFTP folder on a scheduled basis, starting this automation.
  2. Download CSV from FTP folder. Retrieve the file from BrickFTP, download it from the URL, and parse it into rows so each lead record can be processed individually.
  3. Search Marketo for each lead. For each row in the CSV, search Marketo to check if a lead with that email already exists in the database before proceeding.
  4. Create new leads in Marketo. When a lead is not found, create a new lead record in Marketo with the data from that CSV row. If errors occur, catch and log them.
  5. Log errors and outcomes. Output a message with any unhandled errors that occurred during the import so the team can review what failed and investigate.