Google Sheets Import and Export for Apify avatar

Google Sheets Import and Export for Apify

Pricing

$5.00 / 1,000 results

Go to Apify Store
Google Sheets Import and Export for Apify

Google Sheets Import and Export for Apify

Import tabs from a shared workbook, or export a dataset: append below the last entry, replace a tab, or merge by ID. Needs a service account for writing; public links read freely.

Pricing

$5.00 / 1,000 results

Rating

0.0

(0)

Developer

BEPO Labs

BEPO Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

πŸ“Š What is Google Sheets Import and Export?

Move data between Apify and Google Sheets in both directions. Export pushes a dataset into your document; import returns each row as an item, named by the header. It talks to the official API, so nothing passes via a third party, and AI agents can call it using the Apify MCP server.

  • Scraper results delivered: send the dataset of any Actor run to the sheet your team already uses, after every scheduled run
  • Keep a sheet up to date: upsert by a key such as URL or product ID: changed rows are updated in place, new ones are appended, nothing is duplicated
  • Sheets as input: read a list of URLs, keywords or products from a sheet and feed it into another Actor
  • Reports and dashboards: keep a Looker Studio or Sheets dashboard fed with fresh rows without copy and paste

Google Sheets Import and Export: Send any Apify dataset or JSON to a Google Sheet (append, replace or upsert by key), or read a sheet back as clean rows.

✨ Why use this Actor?

  • βœ… Upsert by key: rows with the same keyColumn value are updated in place, cells of columns the row lacks stay, new keys are appended
  • βœ… New columns join by themselves: the existing header is kept and new fields are added to the right, so a scraper that adds a field does not break your sheet
  • βœ… Dry run first: dryRun plans the write and shows a preview in the run summary; nothing is written and only the run is charged
  • βœ… Runs that finish: chunked writes and retries with exponential backoff on Google's quota (429) and server errors; a wrong share or range stops at once with a message that says what to fix
  • βœ… Your own Google setup: a service account key you control, no OAuth pop-up and no token stored by a third party; public sheets import without one

πŸ“¦ What data can you get with Google Sheets Import and Export?

πŸ”€ Every column of the sheet, named by the header rowπŸ”  Column letters (A, B, ...) when headerRow is off🧩 Empty header cells as column_C, duplicates as name_2
🧾 Export summary: rows written, appended, updated, skippedπŸ”— Link to the sheet that was written

Import fills the dataset. Export writes to your sheet and puts its run summary into the key-value store (OUTPUT).

πŸš€ How to use Google Sheets Import and Export

Google Sheets Import and Export works in a few clicks, no coding needed:

  1. Create a free Apify account (the free plan includes 5 USD of monthly credit).
  2. Open Google Sheets Import and Export and click Try for free.
  3. Pick export or import, paste the sheet's URL and, for export, the dataset ID and your service account key.
  4. Click Start and wait for the run to finish (most runs take seconds).
  5. Download your data as JSON, CSV, Excel, XML or HTML, or send it straight to Google Sheets, Make, Zapier or your AI agent.

How Google Sheets Import and Export works

⬇️ Input

Only mode and spreadsheetId are required. Export also needs serviceAccountJson and either datasetId or rows; import reads link-shared sheets without a key.

Setup in 3 minutes

Google Cloud console > IAM > Service accounts > Create (no roles needed); Keys > Add key > JSON and paste the file into serviceAccountJson; APIs > Library > Google Sheets API > Enable; then share the sheet with the client_email inside as Editor (export) or Viewer (import).

Write modes

append adds below the last row, replace clears the target first, upsert matches rows by keyColumn. sheetName picks the tab (default Sheet1, created if missing unless createSheet is off).

Ranges

Import takes any A1 range such as A1:F500 or 'My tab'!A:D; empty selects the whole first tab. maxRows caps the rows (0 for all).

FieldTypeWhat it doesDefault
Mode (mode)stringExport writes rows into the sheet; import reads a range into this run's dataset."export"
Spreadsheet URL or id (spreadsheetId)stringThe sheet's URL from the browser (https://docs.google.com/spreadsheets/d//edit) or just the id."https://docs.google.com/spreadsheets/d/
Tab name (sheetName)stringThe tab to write to or read from.
Service-account key (JSON) (serviceAccountJson)stringThe JSON key of a Google Cloud service account; share the sheet with its client_email (Editor for export, Viewer for import).
Dataset id (export) (datasetId)stringThe Apify dataset to export, e.g.
Rows (export) (rows)arrayInstead of a dataset: a JSON array of objects.
Write mode (export) (writeMode)stringNew columns are always added to the right of the header row."append"
Key column (upsert) (keyColumn)stringColumn whose value identifies a row, e.g.
Create the tab if missing (export) (createSheet)booleanOtherwise a missing tab stops the run with the list of tabs.true
Range (import) (range)stringA1 range such as A1:F500 or 'My tab'!A:D.
First row is a header (import) (headerRow)booleanUse the first row as field names; otherwise fields are column letters (A, B, ...).true
Rows per write call (chunkSize)integerLarge exports are written in chunks of this many rows.1000
Maximum rows (maxRows)integerMaximum number of rows to read from the sheet in import mode; 0 reads every row.0
Dry run (export) (dryRun)booleanPlan the export and show a preview in OUTPUT without writing or charging rows.false
Maximum retries (maxRetries)integerRetries per call on Google quota (429) and server errors, with exponential backoff.5

Google Sheets Import and Export input form

Input example

{
"mode": "import",
"spreadsheetId": "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit",
"range": "'Class Data'!A1:F"
}

⬆️ Output

Import gives one dataset item per sheet row, keyed by the header. Export fills your tab; its run summary shows what happened.

Google Sheets Import and Export output table

Output example

One row from an import of Google's public sample sheet ('Class Data'!A1:F):

{
"Student Name": "Alexandra",
"Gender": "Female",
"Class Level": "4. Senior",
"Home State": "CA",
"Major": "English",
"Extracurricular Activity": "Drama Club"
}

Export run summary

After an export the key-value store record OUTPUT holds the counts and the sheet link (example numbers):

{
"rowsIn": 120,
"planRows": 120,
"rowsWritten": 120,
"appended": 95,
"updated": 25,
"skipped": 0,
"columns": 8,
"writeCalls": 2,
"dryRun": false,
"sheetUrl": "https://docs.google.com/spreadsheets/d/<id>/edit"
}

View the results as a table or JSON in the Output tab and download them as JSON, CSV, Excel, XML, HTML or RSS, all fields or only those you pick.

πŸ’° How much does Google Sheets Import and Export cost?

Google Sheets Import and Export is priced per event: 5 USD per 1,000 rows (0.005 USD per row), with no monthly rental. Plus 0.005 USD once per run. Dry runs charge only the run.

You getYou pay
100 rows0.5 USD
1,000 rows5 USD
10,000 rows50 USD
100,000 rows500 USD

Optional extras are charged only when you switch them on:

  • Row: 0.2 USD per 1,000

πŸ’‘ Apify's free plan gives you 5 USD of credit every month, enough for about 1,000 rows at no cost. Set a spending limit per run and the Actor stops there.

βš–οΈ Google Sheets Import and Export vs. the alternatives

Google Sheets Import and ExportCopy and pasteOther Sheets Actors
Upsert by key (update, no duplicates)βœ…βŒvaries
New columns added to the headerβœ…by handvaries
Dry run with previewβœ…βŒrare
Retries on Google's quotaβœ…βŒvaries
Your own service account, no OAuth pop-upβœ…n/aoften OAuth

πŸ”Œ Integrations, API and MCP

Connect Google Sheets Import and Export to your AI agent (MCP)

Give Claude, ChatGPT, Cursor or any MCP client direct access to Google Sheets Import and Export through the Apify MCP server. Add this URL to its settings:

https://mcp.apify.com/?actors=bepolabs/google-sheets

For Claude Desktop, add it under mcpServers in claude_desktop_config.json:

{
"mcpServers": {
"google-sheets": {
"command": "npx",
"args": [
"-y",
"@apify/actors-mcp-server",
"--actors",
"bepolabs/google-sheets"
],
"env": {
"APIFY_TOKEN": "<your Apify API token>"
}
}
}
}

Then ask: "Read the sheet https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms and tell me how many students major in English."

Run it from your code

Python (pip install apify-client):

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("bepolabs/google-sheets").call(run_input={"mode":"import","spreadsheetId":"https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit","range":"'Class Data'!A1:F"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

JavaScript (npm install apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('bepolabs/google-sheets').call({"mode":"import","spreadsheetId":"https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit","range":"'Class Data'!A1:F"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

No-code integrations

Send results to Google Sheets, Slack, Airtable, HubSpot, Make, Zapier, n8n and more from the Integrations tab, start runs on a schedule, or trigger your own endpoint with a webhook when a run finishes. The Apify API gives you full control over runs and datasets.

❓ FAQ

Do I need a Google Cloud account?

For export, yes: a free service account key (see the input tips, about 3 minutes). Import of a sheet shared as "Anyone with the link" needs none at all.

Will an export overwrite my data?

Only with writeMode: replace. append adds below the last row and upsert only changes rows whose key matches; run with dryRun first to see the plan.

How large can an export be?

Rows are written in chunks (chunkSize, default 1000) within Google's limit of 10 million cells per spreadsheet.

Can I run it after every scraper run?

Yes: add it as an integration or webhook on the task of your scraper, or schedule it; set datasetId to that dataset.

My spreadsheet ID is not 44 characters long. Does it work?

Yes. Paste the sheet's URL from the browser or just the id; any length from 20 characters is accepted, older 33-character ids too.

The Actor reads and writes only sheets that you share with your own service account, or that are already public by link, through Google's official API. You stay responsible for the data you move and for Google's terms.

What if something is missing or does not work?

Open an issue on the Issues tab; we read each one and reply. Feature requests are welcome too.

πŸ’¬ Your feedback

Tell us what Google Sheets Import and Export should add on the Issues tab or leave a review; your notes decide what we work on next.

ActorWhat it does
πŸ“ž Phone Number ValidatorBulk phone number validation offline: valid or not, E.164 format, country and line type (mobile, fixed line, VoIP) for every number.
πŸ’Ό ATS JobsEvery open job from company career boards on Greenhouse, Lever, Ashby, Workable, SmartRecruiters and Recruitee in one deduped feed.
🌍 Remote JobsRemote jobs from Remote OK, Himalayas, Jobicy and Arbeitnow in one deduped feed, with salary, posted date and apply link.
πŸ“‡ Website ContactsCompany websites to emails, phone numbers and social profiles, one row per site, with a status that says why nothing was found.
πŸ›οΈ SAM.gov Contract OpportunitiesUS federal contract opportunities by keyword, NAICS, set-aside or agency, with deadlines, contacts and attachments.
πŸ‡¬πŸ‡§ UK TendersUK public contracts from Contracts Finder and Find a Tender by keyword, CPV, value, region and deadline, with daily alerts.
⭐ App Store ReviewsiOS App Store reviews with stars, text, app version and date, plus the app's rating and details, for any store country.
🧩 Chrome Web Store ScraperUsers, rating, version, last update, developer, category and permissions of any Chrome extension.