Sync Google Sheets data to Salesforce every 5 minutes

Recipe ToolsMarketingDocument/FileSales EnablementData ParserUtilitiesDeveloper ToolCRM

What it does

When a scheduled trigger fires every 5 minutes, this automation retrieves rows from Google Sheets and filters the data with Python code. It then searches Salesforce for matching contact records and logs results to a job report.

Who it's for

Data and analytics teams who need to keep Salesforce contacts in sync with a Google Sheets source without manual updates.

How teams use this

Keep Salesforce contacts current from sheets

Run the sync every 5 minutes so Salesforce contacts always reflect the latest data in Google Sheets. No manual refresh is needed and the team sees real-time alignment.

Filter contacts by region before sync

Modify the Python code to filter rows by a region column so only contacts from a specific area are synced to Salesforce. The schedule and search stay the same.

Sync to a different Salesforce object

Change the SOQL query to search a different object like Account or Opportunity instead of Contact. The data flow and schedule remain unchanged.

Alert on sync failures via email

Add a condition to send an email when the job report shows errors so someone is notified immediately if the sync fails. The 5-minute schedule and data flow stay the same.

How it works

  1. Run on a 5-minute schedule. This automation starts every 5 minutes so Google Sheets data stays current in Salesforce.
  2. Fetch rows from the sheet. Retrieve all rows from the specified Google Sheets spreadsheet so the data is ready to filter and match against Salesforce.
  3. Filter data with Python code. Run Python code to clean and filter the Google Sheets rows, preparing them for the Salesforce search query.
  4. Search Salesforce for matching contacts. Query Salesforce with a SOQL search to find contact records that match the filtered data from Google Sheets.
  5. Log results to the job report. Record the sync outcome and any errors to a job report so someone can review what was matched and processed.