How to set up Google Sheets
Cargo supports two authentication modes for connecting to Google Sheets, each suited for different use cases:OAuth (Standard)
OAuth (Standard)
Best for: Personal use, small to medium data volumes, quick setup - Uses
your Google account credentials - Simple one-click authorization - Standard
API rate limits (100 requests per 100 seconds per user) - Access to sheets
you own or have been shared with
Service Account (Recommended for Production)
Service Account (Recommended for Production)
Best for: Production workflows, large data volumes, automated processes
- Higher rate limits (150 requests per minute) - No user interaction required - Ideal for server-to-server communication - Requires Google Cloud setup
Authentication Mode 1: OAuth
OAuth is the simplest way to connect Google Sheets and is perfect for personal use or smaller workflows.Step 1: Connect via OAuth
- In Cargo, navigate to the Google Sheets connector settings.
- Under Authentication, select OAuth.
- Click Connect and authorize Cargo to access your Google Sheets.
- Grant the required permissions when prompted.
- Set up a Google Sheets data model — Create data models from your spreadsheets to trigger Plays and power model search actions.
- Use Google Sheets in workflows — Choose Google Sheets from the node catalog within a Play, Tool, or Agent.
OAuth connections have access to all sheets that your Google account has
permission to view or edit. Make sure you’re using the correct Google account
when connecting.
Authentication Mode 2: Service Account
Using a Service Account is the recommended way to connect Google Sheets if you need to process larger amounts of data without hitting standard API limits.Prerequisite: Google Cloud Account
You must have a Google Cloud account to proceed.- If you don’t have one: Create a Google Cloud account here.
-
If you have one: Log in and select your project (e.g.,
tonal-run-480206-g5).
Step 1: Generate Your Service Account Key
- Navigate to the Service Accounts > Keys section in your Google Cloud Console.
- Click the Add key button and select Create new key.
- In the popup window, select JSON as the “Key type”.
-
Click Create.
- Result: A file ending in
.jsonwill automatically download to your computer. This file contains the credentials Cargo needs.
- Result: A file ending in
Step 2: Connect to Cargo
-
Open the
.jsonfile you just downloaded using a text editor (like Notepad on Windows or TextEdit on Mac) and copy the entire text. - Go back to Cargo and open the Google Sheets connector settings.
- Under Authentication, select Service account (this enables the higher rate limit of 150 requests/min).
- Paste the text you copied into the Service account field.
- Click Save.
Step 3: Activate the Google Sheets API
For the connection to work, you must tell Google to allow this project to use Sheets.- Click this link: Enable Google Sheets API
- Ensure the button says Enabled or click Enable if it is not already active.
- You’re good to go.
Google Sheets actions
Insert record
Insert a new row into a Google Sheet. Use cases- Lead capture – Create new leads from various sources and channels
- Data logging – Add new entries to tracking sheets
- Contact creation – Add new contacts from forms, events, or imports
Update record
Update an existing row in a Google Sheet. Use cases- Data enrichment – Keep spreadsheet information current and accurate
- Status updates – Update record statuses and stages
- Field updates – Modify specific cell values in existing rows
Upsert records
Upsert multiple rows into a Google Sheet (insert or update based on matching criteria). Use cases- Bulk data operations – Insert rows in bulk while avoiding duplicates
- Data synchronization – Keep external systems synchronized with Google Sheets
- Migration workflows – Import data from other systems while handling existing records
Google Sheets data models
Cargo allows you to create data models on top of your Google Sheets data that can be used to trigger Plays and power model search actions.Creating Google Sheets data models
| Field | Description |
|---|---|
| Name | Choose a descriptive name for your data model (required) |
| Slug | Set a unique identifier that cannot be changed once created (required) |
| Spreadsheet | Select the Google Sheet you want to model |
| Worksheet | Select the specific worksheet within the spreadsheet |
The first row of your selected range will be used as column headers. Make sure
your sheet has a header row for best results. The fetchWorksheet extractor
is used to retrieve data from your specified worksheet and range.
Rate limits
| Authentication Method | Rate Limit |
|---|---|
| OAuth | 100 requests per 100 seconds per user |
| Service Account | 150 requests per minute |
Security
- All Google Sheets connections use Google’s secure authentication protocols
- Service account keys are encrypted at rest in Cargo
- OAuth tokens are securely stored and can be revoked at any time from your Google account settings
- Cargo only requests the minimum permissions needed to read and write to your sheets

