Google Sheets Export – Apify Dataset to Sheet, No OAuth avatar

Google Sheets Export – Apify Dataset to Sheet, No OAuth

Pricing

from $0.50 / 1,000 exported rows

Go to Apify Store
Google Sheets Export – Apify Dataset to Sheet, No OAuth

Google Sheets Export – Apify Dataset to Sheet, No OAuth

Send any Apify dataset or JSON array to a Google Sheets tab, automatically after each scraper run. Real append (never overwrites), any tab, no OAuth or browser login, 10M-cell check before writing. Works from AI agents (MCP).

Pricing

from $0.50 / 1,000 exported rows

Rating

0.0

(0)

Developer

Moriarty Data Tools

Moriarty Data Tools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

21 hours ago

Last modified

Categories

Features

Limited permissions

Share

Send any Apify dataset (or a JSON array) to a Google Sheets tab in one run – from a scraper, a schedule, an integration or an AI agent.

  • Real append mode – uses Google's native append, so existing rows are never overwritten.
  • No "App blocked by Google" – you use your own service account. No OAuth screen, no browser login, nothing expires.
  • Works from AI agents (MCP) – Claude, ChatGPT, Cursor or any MCP client can call it; nothing interactive.
  • Any spreadsheet ID – paste the full URL or the ID; old 33-character IDs work too.
  • Any tab – write to any tab by name; it is created if it does not exist.
  • 10M-cell check before writing – if the export would exceed Google's limit, the run stops before touching your sheet.
  • Header that grows – in append mode, new fields are added to the right of your existing header.
  • Readable columns – nested objects become address.city; lists stay in one cell as JSON (no 400-column headers).
  • Pay only for rows written – $0.50 per 1,000 rows, nothing for failed or rejected exports.

Jump to: Try it · Setup · Example · Price · Input · AI agents · FAQ

Try it first: preview mode (no Google setup)

Click Start with no spreadsheet or key (or tick Preview only). Nothing is written to Google: the dataset shows exactly how your first 20 rows and columns would look – with your data/datasetId, or with sample rows. Preview rows are free.

Quick start (3 minutes, once)

  1. Go to Google Cloud Console → 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 it → Keys → Add key → Create new key → JSON. A file downloads.
  5. Open your spreadsheet → Share → paste the service account email (…@….iam.gserviceaccount.com) → Editor.
  6. In this Actor, paste the JSON file content into Google service account key and the sheet URL into Spreadsheet URL or ID.

The key is stored as an encrypted secret input and is never written to logs. It only reaches spreadsheets you explicitly shared with that email.

Example: scraper results to a sheet, every day

A scraper runs every morning and you want its results added to the tab Leads, never overwriting yesterday's rows.

Input (in the scraper's Integrations tab → add this Actor → "Run succeeded"):

{
"spreadsheet": "https://docs.google.com/spreadsheets/d/1AbC.../edit",
"serviceAccountJson": "{ \"type\": \"service_account\", ... }",
"datasetId": "{{resource.defaultDatasetId}}",
"sheetName": "Leads",
"mode": "append",
"fields": ["title", "address.city", "phone", "website", "url"]
}

Day 1 writes the header and 120 rows. Day 2 adds 95 rows below them – yesterday's rows stay where they are. (Without fields, a field that appears for the first time on day 3 is added as a new column to the right of the header.)

titleaddress.cityphonewebsiteurl
Juniper & Oak CoffeeAustin(512) 555-0101https://juniperoak.examplehttps://…
Lantern Street RoastersAustin(512) 555-0102https://lanternstreet.examplehttps://…

(Example data is made up.)

How much does it cost?

WhatPrice
Each row written to your sheet$0.50 per 1,000 rows ($0.0005 per row)
Each run start$0.0005
Platform usageIncluded – no compute bill on top
  • 200 rows a day for a month: 6,000 × $0.0005 + 30 starts ≈ $3.02.
  • Preview runs, failed runs and rejected exports: no row charges.
  • Set Maximum cost per run in the run options: the Actor stops cleanly at that limit.

Input

FieldWhat it does
spreadsheetSheet URL or ID
serviceAccountJsonYour service account JSON key (secret)
datasetIdApify dataset to export (pick it, or {{resource.defaultDatasetId}} in an integration)
dataOr a JSON array of rows (good for agents and small exports)
sheetNameTab name (default Sheet1, created if missing)
modeappend (default) or replace
fieldsOptional list of columns, in order. Nested: address.city
includeHeaderWrite field names in row 1 (default on)
flattenNested objects → dotted columns (default on)
flattenArraysAlso split lists into columns (default off: lists stay as JSON in one cell)
createSheetCreate the tab if missing (default on)
maxRowsStop after N rows
dryRunPreview how rows will look, write nothing, not charged

Output

The run's OUTPUT record (also one summary row in the dataset):

{ "spreadsheetUrl": "...", "sheetName": "Leads", "mode": "append",
"rowsWritten": 95, "columns": ["title", "address.city", "phone", "website", "url"],
"tabCreated": false, "stoppedByCostLimit": false }

Use it from an AI agent (MCP)

Add Apify's MCP server with this Actor as a tool:

{ "mcpServers": { "apify": { "url": "https://mcp.apify.com?tools=moriarty_ag/google-sheets-export" } } }

An agent holding rows can send them straight to a sheet: {"spreadsheet": "...", "serviceAccountJson": "...", "data": [{"name": "Ada", "city": "London"}], "sheetName": "Contacts"}. No browser login is ever needed, so it works unattended.

Switching from another Google Sheets Actor?

If you saw this elsewhereHere
"App blocked by Google" / "Cannot authorize Google Drive"No OAuth at all: your own service account key
Append mode overwrote my dataNative Google append (INSERT_ROWS): never overwrites
"Spreadsheet ID must be 44 characters"Any URL or ID, any length
Can't write to a tab other than the firstsheetName – created if missing
"You reached the max limit of cells" mid-runChecked before writing; nothing is touched if it won't fit
Hundreds of field.0.x columnsLists stay in one cell unless you ask otherwise
Doesn't run from Claude / MCPNothing interactive – agents can run it

FAQ

How do I send Apify results to Google Sheets automatically? On your scraper (or its saved task) open Integrations → add this Actor → start when the run succeeds → set datasetId to {{resource.defaultDatasetId}}. Every successful run then appends to your sheet.

How do I append to an existing sheet without overwriting it? Use mode: append (the default). Rows go below the last row; your header is kept and extended if new fields appear.

How do I replace the sheet every time (a fresh snapshot)? Use mode: replace. The tab is cleared first, then the new rows are written.

Why a service account instead of "Sign in with Google"? OAuth apps get blocked by Google, expire, and need a browser – useless for schedules and agents. A service account works forever, only sees sheets you share with it, and you can revoke it in one click in Google Cloud.

How do I export only some columns, in my order? List them in fields, e.g. title, price, address.city.

Is it safe to paste my key? It's a secret input: stored encrypted by Apify, never logged, only sent to Google. The key only works on spreadsheets you shared with its email. If in doubt, delete the key in Google Cloud and create a new one.

Need the other direction? Google Sheets Import reads any tab – including private sheets – into a dataset with the same key.

Common errors (and the fix the Actor tells you)

MessageFix
No access to the spreadsheetShare the sheet with the service account email as Editor
Google Sheets API is not enabledEnable it in APIs & Services → Library
Not a service-account keyDownload a JSON key of a service account, not an OAuth client
Needs about N cellsFewer fields, a maxRows, or a new spreadsheet
Could not open datasetPick the dataset with the picker (that grants read access)

Limits

  • Google Sheets: 10,000,000 cells per spreadsheet, 50,000 characters per cell (longer values are truncated and marked …[truncated]).
  • Google API quotas apply to your project; the Actor retries automatically on rate limits.

Found a bug? Open an issue on the Issues tab with the input you used (without your key).