If you scrape with Apify, sooner or later you want the results in a Google Sheet: every day, below yesterday's rows, without copying CSVs by hand. This guide shows how to set that up in about 10 minutes, with a connection that never expires and works from schedules and AI agents.
Disclosure: I built the two Actors used here (Google Sheets Export and Google Sheets Import). The Google setup in Step 1 works with any service-account based tool.
Three things usually go wrong when people try this:
- "App blocked by Google": tools that log in with "Sign in with Google" (OAuth) get blocked or their tokens expire, so scheduled runs fail at 3 a.m.
- Append that overwrites: the second run replaces the first instead of adding rows below it.
- Unreadable sheets: nested scraper data turns into hundreds of columns like
metadata.openGraph.7.content.
The fix for the first one is a Google service account: a robot Google account that you create once and share your sheet with. No browser login, nothing to renew. The other two are handled by the Actor.
What you need
- An Apify account (the free plan is enough to follow along)
- A Google account
- A Google Sheet you want to fill
Step 1: Create a Google service account (3 minutes, once)
- Open Google Cloud Console and create a project (any name).
- Go to APIs & Services → Library, search Google Sheets API and click Enable.
- Go to IAM & Admin → Service Accounts → Create service account. Give it a name like
apify-sheets. It needs no roles, so skip that step. - Open the new account → Keys → Add key → Create new key → JSON. A small
.jsonfile downloads.
That file is the key. Treat it like a password: never paste it in a chat, a public task or a repo. It only works on sheets you explicitly share with it, and you can delete it in one click from the same Keys tab.
Copy the account's email. It looks like apify-sheets@your-project.iam.gserviceaccount.com. You need it in the next step.
Step 2: Share your sheet with the service account
Open your Google Sheet → Share → paste the service account email → role Editor → Send. Google may warn that the address can't receive email. That's fine.
The sheet stays private: only you, the people you already shared it with, and the robot can open it.
Step 3: Preview, then export
Open Google Sheets Export on Apify and click Try for free.
Preview first (no Google needed). Pick a dataset from one of your scraper runs in Dataset ID to export and tick Preview only. The run writes nothing to Google; its Output shows exactly the rows and columns your sheet will get. Nested objects become columns like address.city; lists stay in one cell as JSON, so a crawler's output gives you ~50 columns instead of ~400.
Then the real export. Untick Preview and fill in:
- Spreadsheet URL or ID: the whole address bar of your sheet
- Google service account key: the full content of the
.jsonfile - Tab name: e.g.
Leads(created if it doesn't exist) - Mode: Append (keeps existing rows)
- Columns (optional): only the fields you want, in order, e.g.
title,address.city,url
Click Start. Run it twice and you'll see the point of real append: the second run's rows land below the first ones, with a single header row.
Step 4: Make it automatic after every scraper run
Apify can start one Actor when another finishes. Set it up once and every successful scrape lands in your sheet.
- Open your scraper (or its saved task) → Integrations tab.
- Click Add integration → Apify Actor and choose Google Sheets Export.
- Trigger: Run succeeded.
- In the input, set Dataset ID to export to
{{resource.defaultDatasetId}}. Apify replaces it with the dataset of the run that just finished. - Fill in the spreadsheet, key, tab and
appendas in Step 3. Save.
The whole input as JSON:
{ "spreadsheet": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit", "serviceAccountJson": "PASTE_THE_FULL_JSON_KEY_HERE", "datasetId": "{{resource.defaultDatasetId}}", "sheetName": "Leads", "mode": "append" } Now schedule the scraper (Schedules → Create new, e.g. every morning) and the sheet grows by itself. Want a fresh snapshot each time instead of a growing log? Use "mode": "replace".
From an AI agent. The Actor has nothing interactive, so Claude, ChatGPT or Cursor can call it through Apify's MCP server and write rows straight to a sheet: add https://mcp.apify.com?tools=moriarty_ag/google-sheets-export to your MCP client.
Bonus: the other direction, a private sheet as scraper input
Many teams keep their scraping targets in a sheet: a list of URLs, keywords or products that non-technical colleagues edit. Google Sheets Import reads any tab (including private sheets, with no public link) into an Apify dataset, using the same service account (as Viewer is enough).
A tab with the header URL | Priority in row 1 and two shops in rows 2 and 3 becomes:
[ { "_row": 2, "URL": "https://shop-a.example", "Priority": "high" }, { "_row": 3, "URL": "https://shop-b.example", "Priority": "low" } ] _row is the real row number, so every result can be traced back to the row it came from. That gives you a full loop with no code: sheet → Import → scraper → Export → sheet.
What it costs
Both Actors charge per row and include the platform usage: $0.50 per 1,000 rows plus $0.0005 per run (cheaper on paid Apify plans). A daily scraper that adds 200 rows costs about $3 a month. Preview runs and failed runs don't pay for rows.
Alternatives, honestly
- Download CSV from Apify and import by hand: fine for one-off exports, but manual every time.
- Make, Zapier or n8n with their Google Sheets module: good if you already pay for one of them; it's one more tool and plan, with its own Google login.
- An Apify Actor with a service account (this guide): best for scheduled scrapers, integrations and AI agents; you create the Google key once (Step 1).
Troubleshooting
- No access to the spreadsheet: share the sheet with the service account email (Step 2).
- Google Sheets API is not enabled: APIs & Services → Library → Google Sheets API → Enable.
- Not valid JSON / not a service-account key: paste the whole
.jsonfile, from{to}. - Could not open dataset: pick the dataset with the picker, or use
{{resource.defaultDatasetId}}in an integration. - Needs about N cells: Google allows 10 million cells per spreadsheet; export fewer columns or use a new sheet.
Questions or a bug? Open an issue on the Actor's Issues tab. I read every one.
Disclosure again: I'm the developer of Google Sheets Export and Google Sheets Import.

