# Send an Apify dataset to Google Sheets

**Use case:** 

Append any dataset (or a run, or an actor's last run) to a Google Sheets tab, with a header row, nested fields as columns and retries through Google rate limits.

## Input

```json
{
  "spreadsheet": "https://docs.google.com/spreadsheets/d/1snnMDbeCvzo5vXMx29JNlpqTV4R-_Y9zpAAMCPopG7U/edit",
  "tab": "Products",
  "mode": "append",
  "onRemoved": "delete",
  "rawData": [
    {
      "sku": "SKU-1001",
      "title": "Wireless headphones",
      "price": 199,
      "country": "US",
      "inStock": true
    },
    {
      "sku": "SKU-1002",
      "title": "Air fryer 4 qt",
      "price": 79.99,
      "country": "US",
      "inStock": true
    },
    {
      "sku": "SKU-1003",
      "title": "Desk lamp",
      "price": 34.5,
      "country": "DE",
      "inStock": false
    },
    {
      "sku": "SKU-1004",
      "title": "Travel mug",
      "price": 24,
      "country": "FR",
      "inStock": true
    }
  ],
  "incremental": false,
  "offset": 0,
  "dedupe": false,
  "flatten": true,
  "arrays": "join",
  "arraySeparator": ", ",
  "addSyncedAt": false,
  "valueInput": "RAW",
  "freezeHeader": true,
  "boldHeader": true,
  "autoResize": true,
  "createBackup": false,
  "headerRow": 1
}
```

## Output

```json
{
  "url": {
    "label": "Sheet",
    "format": "link"
  },
  "tab": {
    "label": "Tab",
    "format": "text"
  },
  "mode": {
    "label": "Mode",
    "format": "text"
  },
  "appended": {
    "label": "Added",
    "format": "number"
  },
  "updated": {
    "label": "Updated",
    "format": "number"
  },
  "removed": {
    "label": "Removed",
    "format": "number"
  },
  "unchanged": {
    "label": "Unchanged",
    "format": "number"
  },
  "read": {
    "label": "Read",
    "format": "number"
  },
  "columns": {
    "label": "Columns",
    "format": "number"
  },
  "backupKey": {
    "label": "Backup key",
    "format": "text"
  },
  "error": {
    "label": "Error",
    "format": "text"
  },
  "warnings": {
    "label": "Warnings",
    "format": "array"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Google Sheets Sync: Import, Export & Upsert Datasets Actor is ready to run with the inputs already set for "Send an Apify dataset to Google Sheets". [Sign up or log in](https://console.apify.com/create-task-from-example/6nDSfFi2pLcuW6O9x) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Send an Apify dataset to Google Sheets" task

The Google Sheets Sync: Import, Export & Upsert Datasets Actor will start running based on the input automatically. You can also change all the input fields, like spreadsheet, tab, and more, to match your specific use case.

### 3. Receive the "Send an Apify dataset to Google Sheets" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as sheet, tab, mode, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Send an Apify dataset to Google Sheets" task via API](https://apify.com/cleanpull/google-sheets-sync.md).

## About this Actor

This example demonstrates how to use [Google Sheets Sync: Import, Export & Upsert Datasets](https://apify.com/cleanpull/google-sheets-sync.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/cleanpull/google-sheets-sync.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/cleanpull/google-sheets-sync.md

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`).
