Salesforce Connector for Google Sheets
Introduction
The Salesforce connector pulls a standard or custom object into Flookup Staging, so you can deduplicate, standardise or match the records with the same tools you use on any sheet.
Included with the 1-Year Pass and the Team Pass. The 1-Month Pass and the free trial do not include connectors. See pricing for details.
Open Extensions > Flookup Data Wrangler > Data Connectors and choose Salesforce. Unlike Airtable, Salesforce uses OAuth, so there is a Connected App to create once in your org.
Create the Connected App
- In Salesforce, open Setup, then App Manager, and click New Connected App.
- Give it a name such as Flookup Sheets and a contact email, then tick Enable OAuth Settings.
- Paste the callback URL shown in the Salesforce card. It is https://script.google.com/macros/d/<SCRIPT ID>/usercallback and the sidebar fills in the real id.
- Add the scopes Manage user data via APIs (api) and Perform requests at any time (refresh_token, offline_access).
- Save, then wait a few minutes. A new Connected App can take up to ten minutes to become active.
- Click Manage Consumer Details and copy the Consumer Key and Consumer Secret.
The callback URL contains the script id of the Apps Script project that runs Flookup. If you install the add-on from the Marketplace, the id is the published one. If you copy the code into your own project, the id changes and the Connected App must be updated.
Connect Salesforce
- Paste the Consumer Key and Consumer Secret into the Salesforce card.
- Choose Production or Sandbox. A sandbox authorises against test.salesforce.com.
- Click Save app.
- Click Connect and authorise Flookup in the tab that opens.
- Return to the sidebar and click Refresh status.
The tokens are stored in your Apps Script user properties and the consumer secret is never shown back in the sidebar. The access token is refreshed automatically after roughly 100 minutes and once more if Salesforce rejects it. Use Disconnect to remove the stored tokens; the Connected App stays in Salesforce until you delete it there.
Choose Objects and Fields
Click Load objects to list the objects your user can query, then choose one. Only queryable objects appear, so a setup object that cannot be read with SOQL is left out.
The field list comes from the object describe. Address, location and deprecated fields are hidden because SOQL cannot select them directly. Tick the fields you need. Include Id when the sheet will be compared with another export.
Build the SOQL Query
The sidebar assembles
SELECT … FROM … WHERE … ORDER BY … LIMIT …
from your choices and shows the statement before it runs. You can edit the query directly.
- Only a single SELECT statement runs. A semicolon or a comment marker in the filter or sort is refused.
- The LIMIT is clamped to 5,000 records, which is also the connector's row cap.
- A relationship such as
Owner.Nameis allowed in the field list and arrives as the related name. - Dates in a filter use SOQL literals, for example
LastModifiedDate > 2026-01-01T00:00:00Z.
Pull Records
Click Pull to staging. Flookup clears the staging sheet, writes the field names as a bold header row and then the records.
- Results are paged through nextRecordsUrl, so a query returns more than the first batch.
- The internal
attributesblock is dropped, so every column is a real field. - A pull stops at 5,000 records and reports that it was truncated. Narrow the filter to work through a larger object in slices.
- Every pull consumes Salesforce API calls against the org's rolling 24-hour limit. Check the usage in Setup before a large run.
Salesforce write-back is not part of this version. Clean the staging sheet, then edit the records in Salesforce or export the result.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| redirect_uri_mismatch | The callback URL in the Connected App does not match this script. Copy the URL from the sidebar into the Connected App again. |
| invalid_client_id | The key belongs to the other environment. A sandbox key will not work against production, and the reverse is also true. |
| API is not enabled for this org | The edition has no API access. A Developer Edition org works for testing; a paid edition is needed for daily use. |
| INVALID_SESSION_ID after a while | The refresh token was revoked, often by a password change or an admin policy. Click Connect again. |
| No fields appear for an object | The user profile cannot read the object or its fields. Grant field-level access in Salesforce and load the object again. |
| The pull stops at 5,000 | That is the connector cap. Add a WHERE clause on a date or a status and pull the object in several passes. |
Frequently Asked Questions
Is the Salesforce connector read only?
Yes. It pulls records into Google Sheets but never writes back. Write-back is available for Airtable and SQL databases.
How many Salesforce records can one pull return?
A pull stops at 5,000 records and reports that it was truncated. Add a WHERE clause to split a larger object into several pulls.
Does the connector store the Salesforce password?
No. It uses OAuth, so you authorise Flookup in a Salesforce tab and the password never reaches the add-on. The consumer key and secret are stored in your Apps Script user properties.
Can the connector use a Salesforce sandbox?
Yes. Choose Sandbox in the Salesforce card before connecting, and create a separate Connected App in the sandbox org with the same callback URL.
Does the Salesforce connector use the Bulk API?
No. It pages through the REST query API using nextRecordsUrl. For millions of records, run a Bulk API job or Data Loader export and work with the CSV instead.