Skip to main content

Apify and Google Sheets: import targets and export results

Quick answer

Apify integrates directly with Google Sheets: export scraped datasets to Sheets automatically via the Google Sheets Import & Export Actor or via webhook-driven workflows. No coding is required for basic setup: configure inputs in the console, authorize Google once, and reuse the same pattern for any Actor that writes a dataset.

Create an Apify account · Google Sheets Actor →

Google Sheets is one of the most common destinations for web-scraping output. Apify supports a full loop: read URLs from a sheet (as scraper input) and push structured rows back (as scraper output), optionally on a schedule with automatic export after each successful run.

Two-way integration (overview)

DirectionWhat it doesTypical approach
Sheets → ApifyUse rows from a spreadsheet as Start URLs or seed listsPublic CSV export URL + “Link remote text file” on the Actor
Apify → SheetsWrite dataset items as rows in a spreadsheetGoogle Sheets Import & Export Actor or API / Make / n8n / Zapier

Method 1: Import URLs from Google Sheets

Many Actors accept Start URLs. Instead of pasting URLs by hand, point the Actor at a CSV view of your sheet.

Setup steps

  1. Prepare the sheet: one column of URLs (one URL per row) works well for a first test.

  2. Build the CSV export URL: take your document ID from the Sheet URL and append the CSV endpoint:

    Example

    Original: https://docs.google.com/spreadsheets/d/1ABC123xyz/edit
    CSV URL: https://docs.google.com/spreadsheets/d/1ABC123xyz/gviz/tq?tqx=out:csv
  3. Share the sheet: use link sharing so the Actor can fetch the CSV (commonly “Anyone with the link can view” for this pattern).

  4. Link in Apify: in the Actor input, under Start URLs, choose Link remote text file and paste the CSV URL.

The Actor parses the CSV and uses each line as a start URL. The same pattern works for Google Maps, Amazon, site crawlers, and hundreds of other Actors with a Start URLs field.

tip

If the CSV URL returns HTML, confirm /gviz/tq?tqx=out:csv sits immediately after the document ID, not after /edit or other path segments.

Method 2: Export results to Google Sheets (configuration)

To push dataset items into a spreadsheet, use the Google Sheets Import & Export Actor.

Core configuration

  1. Finish a scraper run: open the run detail page and copy the dataset ID (the storage that holds JSON/CSV rows).
  2. Open the Google Sheets Actor, then configure at minimum:
    • Mode: append adds rows; replace overwrites a range (pick based on whether you want history or a fresh snapshot).
    • Dataset ID: the dataset from the completed run.
    • Spreadsheet ID: the long string between /d/ and /edit in the Google Sheet URL.
    • Range / sheet name: as described in the Actor’s input schema (tab name or A1 notation).
  3. Authorize Google: on first run, complete OAuth so Apify can write to your Drive. If something fails, see Apify’s Google integration help and reconnect the account.
  4. Run the Actor: inspect the sheet. The first row should reflect headers derived from your dataset objects.

Limits: Google Sheets has API quotas and a hard cap on spreadsheet size (on the order of millions of cells). High-frequency writes or huge datasets may need batching, filtering, or a warehouse instead. Check the Actor README for current limits.

How to map Actor output fields to Sheet columns

Apify datasets are usually a list of JSON objects. The Google Sheets Actor turns each object into one row:

  • Default behavior: top-level keys become column headers; values fill the row. Nested objects may be flattened or stringified depending on the Actor version, so check the latest input options on the Store page.
  • Controlling columns: if the Sheets Actor exposes field selection, transforms, or “only these properties,” use that to drop noisy fields and fix column order. If not, run a small test export, then adjust the scraper Actor’s output (fewer fields) or add a lightweight transform Actor before export.
  • Renaming headers: rename keys in a Code/Transform step, or map columns in Make, n8n, or Zapier between “run finished” and “append row.”
info

Treat the first successful export as your schema contract: download JSON from the dataset tab, list the keys you need, then lock the same set of fields for production runs.

Scheduling with automatic export

Pattern A: Schedule + manual Sheets Actor
Use Apify Schedules on the scraper. After each run, start the Google Sheets Actor with the new dataset ID (fine for low volume or ops-owned workflows).

Pattern B: Webhook-driven pipeline (auto-export)

  1. On the scraper Actor (or integration), add a webhook that fires when a run succeeds.
  2. The webhook target (Apify API, Make, n8n, or Zapier) reads the dataset ID from the payload and starts the Google Sheets Actor with that ID.
  3. Keep append mode if you want a growing log; use replace plus a dedicated “latest” tab if you only want the current snapshot.

Pattern C: Integration platforms
Make, n8n, and Zapier can watch Apify runs and map fields to Sheets with visual column mapping. This helps when you need per-column formulas or CRM-style enrichment between steps.

Common use cases

Apify Affiliate Banner 728x90Apify Affiliate Banner 728x90Apify Affiliate Banner 300x50Apify Affiliate Banner 300x50
Use caseSheets → ApifyApify → Sheets
Lead listsColumn of place or profile URLsNames, phones, sites, ratings as columns
Price monitoringProduct URL listsPrice, stock, timestamp rows
SEO / content QAURL inventory from stakeholdersTitle, status code, canonical, word count
Social monitoringProfile or post URLsEngagement metrics, captions, media URLs

Troubleshooting (quick reference)

IssueWhat to try
Cannot access spreadsheetConfirm sharing, correct spreadsheet ID, and that the authorized Google user can edit the file.
Authorization failsRe-run OAuth; remove stale Google connections and reconnect per Apify help docs.
Rows overwrite instead of appendSwitch the Sheets Actor to append mode or a dedicated tab for each run.
CSV import shows wrong URLsEnsure one URL per row, no merged cells, and a valid gviz CSV URL.
Quota or size errorsReduce columns, filter the dataset, split workbooks, or lower run frequency.

Getting started

  1. Sign up for Apify: the free tier includes monthly credits to test exports.
  2. Create a Google Sheet for inputs and/or outputs.
  3. Run a scraper and export once with the Google Sheets Actor.
  4. Add a schedule and webhook when the manual path is stable.
tip

Open Apify, pick any Store Actor, and send the first dataset to Sheets in one sitting, then automate.

Frequently Asked Questions

Yes. Use the Google Sheets Import & Export Actor (lukaskrivka/google-sheets) to push items from any dataset into a spreadsheet. Chain Apify webhooks or tools like Make, n8n, or Zapier so each successful scraper run triggers an export with the new dataset ID.

Append /gviz/tq?tqx=out:csv after the document ID in your Sheet URL to get a CSV link. Paste that URL under Start URLs using Link remote text file. Ensure the sheet is readable with the link-sharing setting you chose.

Each dataset object becomes one row; JSON keys typically become headers. Use the Sheets Actor’s field or transform options if available, trim fields at the scraper, or map columns in Make, n8n, or Zapier between the finished run and the sheet append step.

There is no separate Sheets subscription from Apify. You pay for platform usage (compute, storage, proxies) and any Actor pricing. The free plan includes monthly credits; check Billing after a small test run.

Yes. Schedule the scraper with Apify Schedules, then either run the Google Sheets Actor after each job or use a webhook to start the Sheets Actor automatically when the scraper succeeds.

Common mistakes and fixes

Spreadsheet is not updating after the run.

Confirm the Google Sheets Actor ran to completion, the dataset ID matches the finished run, and you used append vs replace as intended.

OAuth or permission errors.

Reconnect Google in the integration flow, ensure the Google account can edit the target spreadsheet, and retry after revoking stale tokens if needed.

Columns do not match expectations.

Dataset keys define headers. Normalize fields upstream, use transform options in the Sheets Actor if available, or route through Make/n8n for custom column order.

Apify Affiliate Banner 728x90Apify Affiliate Banner 728x90Apify Affiliate Banner 300x50Apify Affiliate Banner 300x50