# Google Sheets Export – CSV & JSON to Google Sheets (`rowfeed/google-sheets-export`) Actor

Send Apify datasets, CSV and JSON files to any Google Sheet: share the sheet with our export account, no OAuth. Append or replace, skip rows already in the sheet, new columns added. $0.05 per 1,000 rows.

- **URL**: https://apify.com/rowfeed/google-sheets-export.md
- **Developed by:** [Rowfeed](https://apify.com/rowfeed) (community)
- **Categories:** Integrations, Automation, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.05 / 1,000 row writtens

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Sheets Export – CSV & JSON to Google Sheets

Send the results of any Apify Actor run, a CSV file or a JSON file to a Google Sheet. No Google sign-in, no OAuth screens and no API keys. You share the sheet with our export account once, and every run writes to it.

### Setup (one minute, once per sheet)

1. Open your Google Sheet and click **Share**.
2. Add **`rowfeed-sheets@gbp-autpost.iam.gserviceaccount.com`** as **Editor**.
3. Paste the sheet's link into this Actor's input.

That's it. The account can only open sheets that you share with it, and you can remove it from **Share** at any time. A sheet is tied to the first Apify account that exports to it, so nobody else can write to your sheet through this Actor, even with its link.

### What it does

- **Sources:** Apify datasets (pick them in the form, or use `{{resource.defaultDatasetId}}` in an integration), public CSV/JSON/JSON Lines file links, or rows pasted as JSON.
- **Append** (default) adds new rows below everything already in the tab. Existing cells are never overwritten: new columns get their names in the empty cells to the right of your header. **Replace** writes the new table from the top and only then removes the old rows and columns that are left over. It changes nothing when there is nothing to write or when any source failed.
- **Skip rows already in the sheet:** set "Skip rows already in the sheet" to a column such as `url` or `email`. Rows whose value is already in the tab (or earlier in the same export) are skipped and not charged. This makes daily runs add only the new results.
- **Columns:** the tab's existing header is kept, and new fields are added as new columns on the right. Nested objects become dot columns (`address.city`), and lists become comma-separated text. Pick only the columns you want, in your order, with "Columns".
- **Safe text:** values are written as plain text and numbers, never as formulas, so scraped text that starts with `=` cannot run in your sheet.
- **Tabs:** write to any tab by name (upper/lower case does not matter). The Actor creates the tab if it does not exist.
- **Header check:** in append mode, row 1 of the tab must be a header that shares at least one name with your data, so rows never land under an unrelated table.

### Use it after another Actor (integration)

In the Actor whose results you want in Sheets, open **Integrations → Add → Actor → Google Sheets Export** and use this input:

```json
{
  "spreadsheet": "https://docs.google.com/spreadsheets/d/your-sheet-id/edit",
  "sheetName": "Results",
  "datasetIds": ["{{resource.defaultDatasetId}}"],
  "skipDuplicatesBy": ["url"]
}
```

Every finished run then appends its new rows to the sheet.

### Output

The Actor writes to your sheet. Its own dataset gets one summary row: sheet link, tab, rows written, duplicates skipped and any source that could not be read.

If the sheet is not shared with the export account, the run stops before writing and tells you which address to add.

### Pricing

Pay per event, no subscription:

- **$0.05 per 1,000 rows written** ($0.00005 per row). Skipped duplicates are free.
- $0.003 per run.

Example: a daily run that adds 500 new rows costs about $0.03.

### Good to know

- Google Sheets holds up to 10 million cells per spreadsheet. Very long text is cut at Google's limit of 50,000 characters per cell.
- Google limits how fast one account can write. The Actor writes in batches of 2,000 rows and waits and retries when Google asks it to slow down.
- Files: CSV (comma, semicolon or tab, UTF-8 or Excel encoding), JSON or JSON Lines, up to 20 MB each.

### More tools from Rowfeed

- [Remove Duplicates & Merge](https://apify.com/rowfeed/dataset-merge-dedup) – merge several runs, CSV or JSON files into one table first.
- [Google Maps Scraper](https://apify.com/rowfeed/google-maps-scraper) – places with phone, website, rating and address, straight into a lead sheet.
- [SERP API & Rank Checker](https://apify.com/rowfeed/google-serp-api) – daily Google rankings into a rank-tracking sheet.
- [Keyword Research Tool](https://apify.com/rowfeed/keyword-search-volume) – search volume and CPC for a keyword list.
- [Website Traffic Checker](https://apify.com/rowfeed/website-traffic-checker) – traffic and authority for a list of domains.

Not affiliated with Google. Google Sheets is a trademark of Google LLC.

# Actor input Schema

## `spreadsheet` (type: `string`):

Link to your Google Sheet. Before the first run: open the sheet, click Share and add the export account (shown in the README and in the run log) as Editor. No Google login or OAuth needed.

## `sheetName` (type: `string`):

Tab (worksheet) to write to. Created if it does not exist. Empty = the first tab.

## `datasetIds` (type: `array`):

Datasets to export, e.g. a run's results. In an integration (run another Actor, then this one) use {{resource.defaultDatasetId}}.

## `fileUrls` (type: `array`):

Public links to CSV, JSON or JSON Lines files (up to 20 MB each).

## `rows` (type: `array`):

Or paste rows as a JSON array of objects.

## `mode` (type: `string`):

Append keeps what is in the tab and adds new rows below. Replace clears the tab first (never when there is nothing to write).

## `skipDuplicatesBy` (type: `array`):

E.g. url or email: rows whose value is already in the sheet (or earlier in this export) are skipped and not charged. Ideal for daily runs that add only new results.

## `columns` (type: `array`):

Optional: export only these columns, in this order. Nested fields are columns with dots (address.city).

## Actor input object example

```json
{
  "spreadsheet": "https://docs.google.com/spreadsheets/d/1AbC.../edit",
  "mode": "append"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("rowfeed/google-sheets-export").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("rowfeed/google-sheets-export").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call rowfeed/google-sheets-export --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rowfeed/google-sheets-export"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/T99lRXib5inUJfHd9/builds/EZCj5a2g112Tv19IB/openapi.json
