Google Sheets Export & Import - Reliable, No OAuth Expiry
Pricing
from $0.20 / 1,000 row written or importeds
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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
Features
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
Use it as an integration (recommended)
- Open the Actor whose results you want in Sheets (e.g. Google Maps Scraper).
- Go to Integrations → Add integration → Apify Actor, pick this Actor.
- 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
- Go to Google Cloud Console and create (or pick) a project.
- APIs & Services → Library → Google Sheets API → Enable.
- IAM & Admin → Service Accounts → Create service account (no roles needed).
- Open the service account → Keys → Add key → Create new key → JSON. A
.jsonfile downloads. - Open your spreadsheet → Share → add the service account's email (
...@...iam.gserviceaccount.com) as Editor. - Paste the whole content of the
.jsonfile into the Google service account key field. It is stored encrypted.
Input
| Field | Description |
|---|---|
spreadsheet | Spreadsheet URL or ID (required for export) |
serviceAccountJson | Service account key JSON (required for export, secret) |
mode | append (default), replace, append-unique, import |
sheetName | Tab name, default Sheet1. Created if missing |
datasetId | Dataset to export. Optional when used as an integration |
rawData | JSON array to export instead of a dataset |
uniqueKeyColumns | Key columns for append-unique |
columns | Export only these columns, in this order |
flatten | Flatten nested objects into dot-notation columns (default true) |
maxItems | Row 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
columnsto 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).