Get Salesforce Leads

Chris Reid

Chris Reid

Tutorial Overview

One of the challenges with the default Salesforce connector add-on in Google Sheets is the inability to persist a connection and have it sync on a schedule. In this tutorial we'll create a connection to pull leads in to Google Sheets and have it sync on a schedule.
You can preview live Salesforce leads data right here after you authorize SyncWith to connect to your Salesforce account.
We use the Salesforce Object Query Language (SOQL) to get the last 90 days of lead data, including the default Salesforce lead fields (name, title, email, company website, rating, status, phone, lead source, annual revenue, created by user id and description).

Salesforce SOQL Query to get Leads

The query being passed you'll see in the q field it's as follows:
SELECT name, title, email, company, website, rating, status, phone, leadsource, annualrevenue, createdbyid, description FROM lead WHERE createddate = LAST_N_DAYS:90


Expand nested data, rename and delete columns

Column 1
Column 2
Column 3
Column 4
Column 5

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Things to try:

  • Add your custom lead fields - you can find these in the object manger in SFDC:
  • Try changing the default time frame by changing LAST_N_DAYS:90 to 30 or 60
  • Hit the Google Sheet and get leads flowing in on a schedule to Google Sheets

More Salesforce Content