> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Google Sheets incoming webhooks: event paths, payloads, and response data.

The Google Sheets plugin handles incoming webhooks. Point your provider’s subscription URL at your Corsair HTTP handler (see [Overview](https://docs.corsair.dev/plugins/googlesheets/overview.md) for setup context and the exact URL shape).

> [!NOTE]
>
> **New to Corsair?** See [webhooks](https://docs.corsair.dev/concepts/webhooks.md) and [hooks](https://docs.corsair.dev/concepts/hooks.md).

## Webhook map

* `rangeUpdated` (`rangeUpdated`)

## HTTP handler setup

```ts app/api/webhook/route.ts theme={null}
import { processWebhook } from "corsair";
import { corsair } from "@/server/corsair";

export async function POST(request: Request) {
    const headers = Object.fromEntries(request.headers);
    const body = await request.json();
    const result = await processWebhook(corsair, headers, body);
    return result.response;
}
```

## Events

## Range Updated

### Range Updated

`rangeUpdated`

A range of cells in a Google Sheet was updated

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `spreadsheetId` | `string` | No | — |
| `sheetName` | `string` | No | — |
| `range` | `string` | No | — |
| `values` | `(string \| number \| boolean \| null)[]` | No | — |
| `eventType` | `rangeUpdated` | No | — |
| `timestamp` | `string` | No | — |
| `event` | `any` | No | — |

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   eventType: rangeUpdated,
>   spreadsheetId: string,
>   sheetName: string,
>   range: string,
>   values: (string | number | boolean | null)[],
>   timestamp: string
> }
> ```

**`webhookHooks` example**

```ts theme={null}
googlesheets({
    webhookHooks: {
        rangeUpdated: {
            before(ctx, args) {
                return { ctx, args };
            },
            after(ctx, response) {
            },
        },
    },
})
```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.