Google Sheets Sync: Append, Upsert, Replace & Read avatar

Google Sheets Sync: Append, Upsert, Replace & Read

Pricing

from $0.15 / 1,000 row written to google sheets

Go to Apify Store
Google Sheets Sync: Append, Upsert, Replace & Read

Google Sheets Sync: Append, Upsert, Replace & Read

Send any Apify dataset, JSON or CSV to Google Sheets, or read a sheet back. Upsert by key, skip duplicates, auto-add new columns, retry Google rate limits, and get errors in plain English. Ideal as an integration after any scraper.

Pricing

from $0.15 / 1,000 row written to google sheets

Rating

0.0

(0)

Developer

Khanjan Kavani

Khanjan Kavani

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 days ago

Last modified

Categories

Features

Limited permissions

Share

Send any Apify dataset, JSON or CSV into Google Sheets, or read a sheet back into a dataset. Built to just work on big, repeated runs: it updates the right rows, skips duplicates, adds new columns by itself, and waits out Google's rate limits instead of failing.

What it does

ModeWhat happensTypical use
AppendAdds rows at the bottom. With key columns, rows already in the sheet are skipped.Daily scraper results into one growing sheet, without duplicates
UpsertUpdates rows whose key already exists, adds the rest.Price or stock tracking: one row per product, always current
ReplaceClears the tab and writes fresh data.A dashboard tab that always shows the latest run
ReadCopies the tab into this run's dataset.Use a sheet as the input list for another Actor

Try it free first: run it with the spreadsheet and key left empty. You get a preview of exactly how your rows and columns will look in Sheets (nothing is written, no rows are charged).

Why people switch to it

  • Doesn't fall over on big data. Writes in chunks of 2,000 rows and retries automatically when Google says "too many requests" (HTTP 429) or has a hiccup (5xx).
  • Upsert by any key. One or more key columns (url, sku, id…). Matching ignores case and extra spaces, and blank rows in your sheet don't break row positions.
  • New fields? New columns. If your data gains a field, a column is added at the end. Your existing columns and their order stay as they are.
  • Nested data becomes readable. {"address": {"city": "Surat"}} becomes a column address.city. Lists of words become a, b, c.
  • Errors in plain English. Instead of a stack trace you get, for example: "Open the sheet, click Share, and add sync-bot@your-project.iam.gserviceaccount.com as Editor."
  • Creates the tab for you if it doesn't exist yet.

Setup (once, about 5 minutes)

  1. Open Google Cloud console, create a project (free), and enable Google Sheets API.
  2. Go to IAM & Admin → Service accounts → Create service account. No roles are needed.
  3. Open the service account → Keys → Add key → JSON. A file downloads.
  4. Open that file, copy everything, and paste it into Service account JSON key (stored encrypted by Apify).
  5. Open your Google Sheet → Share → add the service account's email (it ends in iam.gserviceaccount.com) as Editor.

Run it after another Actor automatically

In your scraper's Integrations tab, add "Run Actor" → Google Sheets Sync and set:

{
"spreadsheet": "https://docs.google.com/spreadsheets/d/your-sheet-id/edit",
"tab": "Results",
"mode": "upsert",
"keyColumns": ["url"],
"datasetId": "{{resource.defaultDatasetId}}",
"serviceAccountKey": "paste once in the integration settings"
}

Every time the scraper finishes, the sheet updates itself.

Input

FieldRequiredNotes
spreadsheetto writeSheet URL or ID (leave empty with the key for a free preview)
serviceAccountKeyto writeFull JSON key of a service account (secret)
modenoappend (default), upsert, replace, read
tabnoTab name; created if missing; empty = first tab
keyColumnsfor upserte.g. ["url"]
datasetId / rawData / dataUrlone of themApify dataset, JSON array, or link to JSON/CSV
columnsnoColumns to put first, in order
flattennoDefault true
parseValuesnoDefault true (Sheets turns 12.5 into a number, dates into dates)
maxItemsnoLimit rows

Output

The run's key-value store OUTPUT record holds a summary, for example:

{ "mode": "upsert", "written": 1840, "updated": 1702, "appended": 138, "columns": 14, "tab": "Results",
"spreadsheetUrl": "https://docs.google.com/spreadsheets/d/.../edit#gid=0" }

In read mode, the rows go into the run's dataset (one item per row, header names as keys).

Pricing

You pay per row written or read, plus $0.001 per run (see the Pricing tab). Skipped duplicates and preview runs have no row charges.

Limits to know

  • Google Sheets holds up to 10 million cells per spreadsheet. The Actor tells you clearly if a write would pass it.
  • A cell holds up to 50,000 characters; longer text is cut and marked …[cut].
  • Upsert reads the whole tab first, so very large tabs (over ~200,000 rows) take longer.

FAQ

Do I need OAuth or a Google login? No. A service account key is more reliable for automation: it never expires like a login token does.

Is my key safe? The field is marked secret, so Apify stores it encrypted and hides it in logs.

Can I use Excel? Upload the Excel file to Google Drive and open it as a Google Sheet, then use its link.

Questions or a missing feature? Open an issue on this Actor's Issues tab. We answer within 2 working days.