Google Sheets Sync: Reliable Import & Export avatar

Google Sheets Sync: Reliable Import & Export

Under maintenance

Pricing

Pay per event

Go to Apify Store
Google Sheets Sync: Reliable Import & Export

Google Sheets Sync: Reliable Import & Export

Under maintenance

Send 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

Blake Daniels

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

20 days ago

Last modified

Features

Limited permissions

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

ModeWhat 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.
replaceOverwrites 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.
readExports 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)

  1. In Google Cloud Console, create a project (or pick one) and enable the Google Sheets API.
  2. IAM & Admin → Service accounts → Create. Open it, Keys → Add key → JSON. A key file downloads.
  3. Open your spreadsheet, click Share, and add the service account's client_email (from the key file) as Editor.
  4. 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.