Google Sheets Export: send any Apify dataset to a spreadsheet avatar

Google Sheets Export: send any Apify dataset to a spreadsheet

Pricing

from $0.15 / 1,000 row exporteds

Go to Apify Store
Google Sheets Export: send any Apify dataset to a spreadsheet

Google Sheets Export: send any Apify dataset to a spreadsheet

Export an Apify dataset to Google Sheets after every scraper run (add it as an integration) or on demand: replace a tab or append rows, nested fields as columns, your header kept. Signs in with a Google service account key, no expiring OAuth; retries Google rate limits. $0.15 per 1,000 rows.

Pricing

from $0.15 / 1,000 row exporteds

Rating

0.0

(0)

Developer

Bosco Labs

Bosco Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 days ago

Last modified

Features

Limited permissions

Share

Export any Apify dataset to Google Sheets in one run: the results of any scraper go straight into your spreadsheet, as a fresh copy (replace) or added below what's already there (append). For anyone who reports, shares or post-processes scraped data in Sheets. Nested fields become their own columns, appends keep your header, and Google's rate limits are retried automatically instead of failing the run.

Built for schedules: it signs in with a Google service account key, not a Google login that expires, so a daily or hourly schedule keeps exporting without re-authorizing.

Pricing (pay per event): $0.00015 per row exported ($0.15 per 1,000 rows). No start fee; the run stops at your max charge limit.

Setup: connect your sheet (2 minutes, once)

The Actor writes with a Google service account: a robot account in your own Google Cloud project that can only touch the sheets you share with it. You never give it your Google password.

  1. Open console.cloud.google.com and create a project (or pick an existing one).
  2. Go to APIs & Services > Library, search Google Sheets API, and click Enable.
  3. Go to IAM & Admin > Service Accounts > Create service account. Any name works, e.g. apify-sheets. Skip the optional role and access steps and click Done.
  4. Open the new service account, tab Keys > Add key > Create new key > JSON. A .json file downloads.
  5. Open your spreadsheet, click Share, paste the service account's email (the client_email in the file, like apify-sheets@your-project.iam.gserviceaccount.com), give it Editor, untick "Notify people", and share.
  6. In this Actor's input, paste the whole content of the .json file into Service account key. It is stored encrypted as a secret input.

If your organization blocks key creation (policy iam.disableServiceAccountKeyCreation), ask your Google Workspace admin, or use a personal Google account.

Input

{
"datasetId": "aBcD1234efGH5678i",
"spreadsheetId": "1AbCdEfGhIjKlMnOpQrStUvWxYz0123456789",
"sheetName": "Leads",
"mode": "append",
"serviceAccountJson": "{ \"type\": \"service_account\", ... }",
"fields": ["name", "address.city", "phone", "website"]
}
FieldMeaning
datasetIdThe Apify dataset to export (required for an export)
spreadsheetIdFrom the sheet URL: docs.google.com/spreadsheets/d/<ID>/edit (required for an export)
sheetNameTab to write to, created if missing. Empty = the first tab (any language)
modereplace (default) clears the tab first; append adds rows below existing data
serviceAccountJsonThe service account's JSON key (required for an export, secret)
fieldsOnly these columns, in this order. Empty = all fields

Free preview: without spreadsheetId or serviceAccountJson the run writes nothing and charges nothing: it puts the first 10 rows of your dataset (or of a small sample, without datasetId) in its own dataset, exactly as they would land in the sheet.

Output

A dataset item like

{"name": "Café Central", "address": {"city": "Vienna", "zip": "1010"}, "tags": ["coffee", "cake"], "rating": 4.6}

becomes this row:

nameaddress.cityaddress.ziptagsrating
Café CentralVienna1010["coffee", "cake"]4.6
  • Nested objects become parent.child columns; arrays are written as JSON text.
  • Numbers and booleans stay numbers and booleans; missing values are empty cells.
  • Values are written as plain values, never as formulas, so scraped text starting with = can't run inside your sheet.
  • Append mode: your existing header row is kept as is. Columns the sheet doesn't have yet are added to the right.

The run's key-value store gets an OUTPUT record:

{"spreadsheetUrl": "https://docs.google.com/spreadsheets/d/1AbC...", "sheetName": "Leads", "rowsWritten": 1250, "columns": ["name", "address.city", "phone", "website"]}

Use cases

  • Scraper to Sheets after every run: add this Actor as an integration on your scraper's task, pass the run's default dataset ID, and use append to build a growing sheet.
  • Client reports: a fixed tab that's replaced with fresh results every day.
  • Lead lists for sales teams: only the columns they need, in the order they need.
  • Hand-off to no-code tools: Looker Studio, Zapier or Make read from the sheet.

Use with AI agents (MCP)

Agents can call this Actor as a tool through the Apify MCP server. Add this server URL to your MCP client (Claude, Cursor, VS Code, ...):

https://mcp.apify.com?tools=bosco_labs/sheets-export

It loads this Actor as a tool, plus the tools that read its results (get-actor-run, get-dataset-items). The hosted server signs you in with OAuth, or accepts your Apify token as Authorization: Bearer <APIFY_TOKEN>. On the default server (https://mcp.apify.com), agents can also find this Actor with search-actors and run it with call-actor.

Example prompts this Actor answers:

  • "Put the results of my last Google Maps run into the 'Leads' tab of my spreadsheet, only name, phone and website."
  • "Replace the 'Daily' tab with today's scraper results."
  • "Append this week's new listings below the existing rows."

For the first one, the agent passes:

{"datasetId": "<dataset ID>", "spreadsheetId": "<spreadsheet ID>", "sheetName": "Leads", "mode": "append", "serviceAccountJson": "<service account JSON key>", "fields": ["title", "phone", "website"]}

Output for agents: the run writes no dataset rows; its OUTPUT record in the key-value store holds spreadsheetUrl, sheetName, rowsWritten and columns, so the agent can link the sheet. serviceAccountJson is required, so the key passes through the agent's tool call: use a service account that is shared only on the sheets the agent may write to.

Cost: $0.00015 per row exported, billed to the Apify account the MCP server is signed in with.

FAQ

I get "Google returned 403" or "404". The sheet isn't shared with the service account, or the spreadsheet ID is wrong. The error message shows the exact email to share it with, as Editor.

"Google Sheets API has not been used in project ... or it is disabled". Do setup step 2 in the same Google Cloud project as the key.

How many rows can I export? Google allows 10 million cells per spreadsheet (rows x columns, across all tabs). Rows are sent in batches of up to 5,000 rows or 2 MB.

What happens on rate limits? Google answers 429 when you write too fast. The Actor waits and retries (up to 5 times, after 1, 2, 4, 8 and 16 seconds), also on Google server errors.

Very long text? Google rejects cells over 50,000 characters, so longer values are cut at 50,000 characters instead of failing the run.

Does replace mode delete formatting? No, only cell values are cleared. Formatting, charts and other tabs stay.

Is my key safe? It's a secret input (encrypted by Apify), it's only used to request a Sheets access token from Google, and it's never logged or saved. Delete the key in Google Cloud whenever you want to revoke access.