Sync Salesforce contacts from Google Sheets with error handling

Recipe ToolsMarketingDocument/FileSales EnablementCRM

What it does

When the clock triggers every 5 minutes, this automation fetches rows from a Google Sheets spreadsheet and searches a lookup table for matching entries. It creates contacts in Salesforce, logs outcomes to a job report, and updates the sheet to mark success or failure without retrying on error.

Who it's for

Sales operations teams who sync contacts from a spreadsheet to Salesforce and need visibility into which rows succeeded or failed.

How teams use this

Sync contacts without manual intervention

Run the sync automatically every 5 minutes so new rows in the spreadsheet become Salesforce contacts without someone opening either system. The job report shows what succeeded and what failed.

Route failed rows to a review queue

Extend this automation to send failed rows to a separate sheet or Slack channel so the team can investigate errors and reprocess them manually instead of losing track of them.

Enrich contacts with additional lookup data

Add more lookup tables or data sources to include phone, company, or other fields on the contact before it lands in Salesforce so records are more complete.

Build a sync dashboard from job logs

Use the job report logs to build a dashboard that shows contacts synced, failures, and error trends over time so the team can spot patterns and improve data quality.

How it works

  1. Run the sync every 5 minutes. The clock triggers this automation to run on a 5-minute interval so contacts stay current between systems.
  2. Fetch rows from the spreadsheet. Get rows from the Google Sheets spreadsheet in batch so all pending contacts are processed together in each run.
  3. Match entries in the lookup table. Search the lookup table in batch to find matching entries for each row, enriching the contact data before Salesforce.
  4. Create contacts and monitor for errors. Create contacts in Salesforce and monitor for errors. On success, log to the job report and update the sheet. On error, log the failure and update the sheet without retrying.
  5. Mark rows as processed. Update the spreadsheet row to reflect the outcome so the next run knows which contacts were already synced.