Google Sheets Import & Export — No OAuth, No Token Expiry avatar

Google Sheets Import & Export — No OAuth, No Token Expiry

Pricing

from $0.50 / 1,000 row written (zero setup)s

Go to Apify Store
Google Sheets Import & Export — No OAuth, No Token Expiry

Google Sheets Import & Export — No OAuth, No Token Expiry

Export any Apify dataset to Google Sheets, or read a sheet into a dataset. Authenticates with a Google service account — a 2-minute one-time setup that never expires, never needs re-consent, and never breaks mid-schedule. Built for scheduled scraper-to-sheet pipelines.

Pricing

from $0.50 / 1,000 row written (zero setup)s

Rating

0.0

(0)

Developer

Heim AI

Heim AI

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Share

The reliable way to get scraper results into Google Sheets. Authenticates with a Google service account — a one-time 2-minute setup that never expires, never asks for re-consent, and never breaks a scheduled pipeline. No OAuth pop-ups, no "token revoked" failures at 3 a.m.

Export any Apify dataset to a sheet, write JSON rows directly, or read a sheet back into a dataset.

Why service-account auth

OAuth-based Sheets integrations fail in production for one structural reason: user tokens expire and get revoked, and a headless scheduled run can't re-consent. A service account is Google's mechanism for exactly this case — machine-to-machine access with a key that keeps working. You share the spreadsheet with the service account's email once, like sharing with a colleague.

Zero setup (30 seconds): open your spreadsheet → Share → add sheets-only@telehealth-mr.iam.gserviceaccount.com as Editor. Done — leave serviceAccountKey empty and runs bill at the standard rate.

Bring your own service account (~2 minutes, discounted rate + full custody):

  1. In Google Cloud Console, create a project (or use any existing one) and enable the Google Sheets API.
  2. IAM & Admin → Service Accounts → Create service account (any name, no roles needed).
  3. Open it → Keys → Add key → JSON. Download the file.
  4. Open your spreadsheet → Share → add the service account's email (...@...iam.gserviceaccount.com) as Editor.
  5. Paste the JSON file's contents into this actor's serviceAccountKey input (stored encrypted).

What it does

ModeInputOutput
dataset-to-sheetdataset ID + spreadsheetDataset items as rows (auto header, nested fields flattened to a.b columns)
json-to-sheetJSON rows + spreadsheetYour rows in the sheet
sheet-to-datasetspreadsheet (+ optional range)Sheet rows as dataset items (first row = keys)
  • Replace or append: replace clears the tab first (scheduled snapshots); append adds below existing rows (running logs). Headers are handled automatically.
  • Missing sheet tabs are created automatically.
  • Accepts the full spreadsheet URL or bare ID; nested objects flatten to dot-notation columns; arrays serialize to JSON.
  • USER_ENTERED mode available when you want Sheets to parse dates/numbers/formulas.

The pipeline this was built for

Any scraper → Sheets, on a schedule, unattended:

  1. Schedule your scraper (any actor).
  2. Add a webhook/integration on run succeeded that calls this actor with { "datasetId": "{{resource.defaultDatasetId}}", "spreadsheet": "<your sheet URL>", "append": false }.
  3. Your sheet is a live, always-current view of the latest run. Dashboards, IMPORTRANGE, Looker Studio — all downstream of a sheet that updates itself.

Example input

{
"mode": "dataset-to-sheet",
"serviceAccountKey": "{ ...paste the JSON key file... }",
"spreadsheet": "https://docs.google.com/spreadsheets/d/1AbC.../edit",
"sheetName": "Leads",
"datasetId": "x1y2z3...",
"append": false
}

Pricing

Pay per event: row-written per data row written, row-read per row read. Zero-setup runs (built-in service account) bill the -zero-setup variants at the standard rate; bring your own service account for the discounted rate. Header rows are free. Empty sources charge nothing. Set maxRows to cap spend.

Scope & fair use

Your key and your data go only to Google's official Sheets REST API — nothing is stored beyond the run. The serviceAccountKey input is encrypted at rest by the Apify platform. This actor is not affiliated with Google. Sheets limits apply (10M cells per spreadsheet, 50k characters per cell — long values are truncated with ).

Formula-injection protection built in: exported data (especially scraped web content) can contain strings like =IMPORTXML(...) that would execute as live formulas and leak your sheet's contents to external URLs. In USER_ENTERED mode this actor escapes formula-shaped values to plain text by default; RAW mode is inherently safe. Only enable Allow formulas for data you generated yourself.


Found this useful? A review on the actor page helps other people find it — and tells me what to build next. Hit a problem? Open an issue and I'll fix it fast.

Telemetry

Each run records one anonymous telemetry event to the developer's own storage: a salted hash of the caller account ID (never the raw ID), the run origin (e.g. web console vs API), and a timestamp. No inputs, results, or personal data are collected - this only measures adoption (distinct and returning users).