Google Sheets Export & Import - Reliable, No OAuth Expiry avatar

Google Sheets Export & Import - Reliable, No OAuth Expiry

Pricing

from $0.20 / 1,000 row written or importeds

Go to Apify Store
Google Sheets Export & Import - Reliable, No OAuth Expiry

Google Sheets Export & Import - Reliable, No OAuth Expiry

Send any Apify dataset or JSON to Google Sheets, or import a sheet into a dataset. Uses a Google service account, so it never breaks because an OAuth login expired. Append, replace, or append only new rows (dedupe by key). Auto-creates tabs and columns, flattens nested JSON.

Pricing

from $0.20 / 1,000 row written or importeds

Rating

0.0

(0)

Developer

seungtaek kim

seungtaek kim

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a day ago

Last modified

Features

Limited permissions

Share

Send the results of any Apify Actor (or any JSON) to Google Sheets, or pull a sheet back into an Apify dataset.

This Actor signs in with a Google service account instead of a personal OAuth login. Personal logins expire and make scheduled runs fail; a service account key keeps working, so the export runs unattended every day.

Features

  • ➕ Append: add new rows to the end of a tab
  • ♻️ Replace: clear the tab and write fresh data (daily snapshots)
  • 🧹 Append only new rows: dedupe on one or more key columns (e.g. url, id), so scheduled scrapes never create duplicates
  • 📥 Import: read a tab into a dataset (header row = field names), e.g. to feed URLs or keywords into another Actor
  • 🗂️ Auto-create tabs and auto-add new columns when your data gets new fields
  • 🪆 Flattens nested JSON (seller.name, address.city); lists become comma-separated text
  • 🎯 Choose and order columns, limit rows
  • 🔁 Retries Google's rate limits (429) and server errors automatically
  • 🛡️ Writes values as raw text, so scraped text starting with = is never executed as a formula
  1. Open the Actor whose results you want in Sheets (e.g. Google Maps Scraper).
  2. Go to Integrations → Add integration → Apify Actor, pick this Actor.
  3. Fill in the spreadsheet URL and the service account key. Leave Source dataset empty; the finished run's dataset is used automatically.

Every finished run now lands in your spreadsheet.

2-minute setup: Google service account

  1. Go to Google Cloud Console and create (or pick) a project.
  2. APIs & Services → Library → Google Sheets API → Enable.
  3. IAM & Admin → Service Accounts → Create service account (no roles needed).
  4. Open the service account → Keys → Add key → Create new key → JSON. A .json file downloads.
  5. Open your spreadsheet → Share → add the service account's email (...@...iam.gserviceaccount.com) as Editor.
  6. Paste the whole content of the .json file into the Google service account key field. It is stored encrypted.

Input

FieldDescription
spreadsheetSpreadsheet URL or ID (required for export)
serviceAccountJsonService account key JSON (required for export, secret)
modeappend (default), replace, append-unique, import
sheetNameTab name, default Sheet1. Created if missing
datasetIdDataset to export. Optional when used as an integration
rawDataJSON array to export instead of a dataset
uniqueKeyColumnsKey columns for append-unique
columnsExport only these columns, in this order
flattenFlatten nested objects into dot-notation columns (default true)
maxItemsRow limit, 0 = all

Example:

{
"spreadsheet": "https://docs.google.com/spreadsheets/d/1AbC.../edit",
"serviceAccountJson": "{ \"type\": \"service_account\", ... }",
"mode": "append-unique",
"sheetName": "Leads",
"uniqueKeyColumns": ["url"]
}

Output

A summary is saved to the dataset (export modes) and to the OUTPUT record:

{
"status": "success",
"mode": "append-unique",
"spreadsheetUrl": "https://docs.google.com/spreadsheets/d/1AbC...",
"sheetName": "Leads",
"rowsProcessed": 120,
"skippedDuplicates": 37,
"rowsNotProcessedDueToMaxCost": 0,
"finishedAt": "2026-11-23T14:00:00.000Z"
}

In import mode, each sheet row becomes one dataset item.

Pricing

Pay per event: you are charged per row written or imported. Skipped duplicates are free. Use "Max cost per run" to cap spending; the Actor stops cleanly at the cap and reports how many rows were left out.

Limits

  • Google Sheets allows 10 million cells per spreadsheet. Use columns to keep wide datasets small.
  • Cells longer than 50,000 characters are truncated (a Google Sheets limit).

Free preview

Run the Actor with its default input (no key, placeholder spreadsheet) to see how your data would be flattened into columns. A preview writes nothing to Google Sheets and charges no rows. Pass rawData to preview your own JSON (first 10 items). If you set a real spreadsheet but no key, the run fails with a clear message instead.

Troubleshooting

  • 403 Permission denied: share the spreadsheet with the service account email as Editor, and enable the Google Sheets API in the same Google Cloud project.
  • 404 Not found: check the spreadsheet URL/ID.
  • Unique key column not present: the column name must match a field in your data (use dot notation for nested fields).