Google Sheets Sync: Reliable Import & Export
Under maintenancePricing
Pay per event
Google Sheets Sync: Reliable Import & Export
Under maintenanceSend any Apify dataset or JSON to Google Sheets (append with dedupe, or safe replace), or export a sheet to a dataset. Retries Google rate limits, chunks big imports, never wipes your sheet on an empty run.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Blake Daniels
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
20 days ago
Last modified
Categories
Features
Share
Send any Apify dataset (or plain JSON) to a Google Sheet, or export a sheet to a dataset. Built for scheduled pipelines that must not break: it retries Google's rate limits, splits big imports into safe chunks, and never wipes your sheet because an upstream run came back empty.
What it does
| Mode | What happens |
|---|---|
| append (default) | Adds rows below the data already in the sheet. New fields become new columns on the right; existing columns never move. Optional deduplicate by columns skip rows that are already there, so reruns don't double up. |
| replace | Overwrites the tab. New data is written first and leftovers are cleared after, so a failure never leaves you with an empty sheet. Refuses to run with zero items unless you allow it. |
| read | Exports the tab to this run's dataset (first row = column names). |
Nested objects are flattened the same way as Apify's CSV export (address/city, tags/0).
Why runs don't fail
- Rate limits: Google allows about 60 writes per minute per user. 429s and 5xx errors are retried with backoff (honouring
Retry-After) instead of failing the run. - Big imports: rows go in chunks (max 5,000 rows or about 1.5 MB per request). Append mode never rewrites the whole sheet, it only adds rows.
- Limits checked first: if an import would pass Google's 10 million cell limit, the run stops before writing anything and says so.
- Credentials that don't expire: use a service account key (recommended) or an OAuth refresh token. Nothing depends on a browser login that times out.
- Errors you can act on: "Share the spreadsheet with bot@project.iam.gserviceaccount.com as an Editor", "The Google Sheets API is not enabled for this project", "Sheet 'Leads' not found. Sheets in this spreadsheet: ...".
- Safe by default: values are written exactly as given (
RAW), so scraped text starting with=can never run as a formula. Turn on parseValues if you want Google to parse dates and formulas.
Setup (about 3 minutes, once)
- In Google Cloud Console, create a project (or pick one) and enable the Google Sheets API.
- IAM & Admin → Service accounts → Create. Open it, Keys → Add key → JSON. A key file downloads.
- Open your spreadsheet, click Share, and add the service account's
client_email(from the key file) as Editor. - Paste the whole key file into Google service account key in this actor's input.
Use it after another actor
Add this actor as an integration on any actor or task (Integrations → Apify actor). It
picks up the dataset of the run that just finished, so you don't need to set datasetId.
With append + deduplicate by (for example url), a daily scraper keeps one growing,
duplicate-free sheet.
Input example
{"spreadsheet": "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit","sheetName": "Leads","mode": "append","datasetId": "aBcD1234","deduplicateBy": ["url"],"serviceAccountKey": "{ ...paste key JSON... }"}
Output
Each run stores a summary as OUTPUT in the key-value store (see sample-output.json):
rows written or read, duplicates skipped, columns, cells truncated at Google's 50,000
character limit, and the number of Google API requests. Read mode also fills the dataset.
Pricing
Pay per event: you pay per row written or read (row-written, row-read). No monthly rental.
Limits
- 10 million cells per spreadsheet and 50,000 characters per cell (Google's limits).
- Append dedupe reads the existing sheet once per run, which is fast for sheets up to a few hundred thousand rows.