---
title: "Google Sheets · Scrape.ly Docs"
description: "Write the results of each successful run into a sheet."
url: https://scrape.ly/docs/google-sheets
markdown: https://scrape.ly/docs/google-sheets.md
---

# Google Sheets

> Write the results of each successful run into a sheet.

Writes the dataset items of each successful run into a Google Sheet. There is no Google sign-in: Scrape.ly writes as its own service account, and you give it access to just the sheets you choose.

1. Click **New automation** and pick **Send results to Google Sheets** (on an Actor's **Automations** tab the Actor is already chosen).
2. Copy the email shown under **Share your sheet with**. In Google Sheets, click **Share**, add that email and give it **Editor** access.
3. Paste the sheet's link, and optionally the **Tab** to write to (the first tab if empty).
4. Pick what happens **On each run**:
   - **Add rows**: new results go below the existing rows.
   - **Replace the tab**: the tab is cleared and filled with the latest results.
5. Save and send a test. A `Scrapely connected ✓` row appears in the sheet; the first real run puts its header in that row.

**Columns**: the first row is a header. Nested fields become columns named with dots, such as `price.amount`; arrays are written as JSON text. With **Add rows**, columns already in the header keep their position and new fields are added at the end. Values are written as plain text and numbers, so text that starts with `=` is never run as a formula. A cell holds at most 50,000 characters.

**When it writes**: only for succeeded runs, and only when the run returned items. **Max rows per run** (1 to 10,000, default 1,000) caps how many items are written.

**Limits**: each Google Sheets automation of this kind writes at most 30 times an hour, and an account at most 500 exports a day (Google Sheets, S3, and GitHub together). If the sheet isn't shared with the service account, or the tab doesn't exist, the delivery history on the automation's page says so.

**API**: a webhook with a `gsheets` notification. Only `ACTOR.RUN.SUCCEEDED` is allowed.

```bash
curl -X POST https://api.scrape.ly/v2/webhooks \
  -H "Authorization: Bearer $SCRAPELY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "eventTypes": ["ACTOR.RUN.SUCCEEDED"],
    "condition": { "actorId": "YOUR_ACTOR_ID" },
    "description": "Results to Google Sheets",
    "notification": {
      "channel": "gsheets",
      "sheetUrl": "https://docs.google.com/spreadsheets/d/…/edit",
      "sheetName": "Results",
      "mode": "append",
      "maxRows": 1000
    }
  }'
```

`mode` is `append` or `replace`, and `sheetName` may be `null` for the first tab. `GET /v2/integrations/gsheets` returns `serviceAccountEmail`, the address to share sheets with.

---

- Previous: [Slack, Discord & Email](https://scrape.ly/docs/slack-discord-email.md)
- Next: [Amazon S3 & R2](https://scrape.ly/docs/amazon-s3.md)
- All docs: [Docs index](https://scrape.ly/docs.md), [llms.txt](https://scrape.ly/llms.txt)
