Webhook Guides

Google Sheet Destination Guide

FastHook can send routed webhook events directly to Google Sheets. Use a GOOGLE_SHEET destination when you want webhook payloads, audit rows, customer events, test traffic, or lightweight operations data in a spreadsheet instead of an HTTP receiver.

A Google Sheet destination is not an HTTP URL. FastHook receives provider traffic at a source URL, routes accepted events through a connection, and appends rows to the configured spreadsheet through the Google Sheets API.

FastHook route from provider webhook through source and connection to a Google Sheet destination.
Google Sheets is a destination type. The provider still calls a FastHook source URL, and the connection decides which events become spreadsheet rows.

When to use Google Sheet destinations

  • Capture webhook samples while building an integration.
  • Export selected customer or order events for operations teams.
  • Keep a lightweight audit trail without building a custom receiver.
  • Fan out one provider source to both a production API and a spreadsheet.
  • Debug transformations by writing the transformed payload to visible columns.

Create a Google Sheet destination in the dashboard

  1. Create or open a Google Sheet and copy the spreadsheet id from the URL.
  2. In FastHook, open Destinations and choose GOOGLE_SHEET.
  3. Set Spreadsheet ID and Sheet name.
  4. Choose OAuth2 login or Service account.
  5. Optionally fill Payload fields to control which payload paths become columns.
  6. Save the destination, connect it to a source, and send a test webhook.

The dashboard builds the Google Sheets write range automatically from the sheet name. For example, Sheet1 writes to Sheet1!A:Z and Лист1 writes to 'Лист1'!A:Z. You usually do not need to configure A1 notation yourself.

Authentication options

OAuth2 login

OAuth2 login is the easiest dashboard flow. Click Connect Google, approve Google Sheets access, and FastHook stores the refresh-token credentials for that destination.

  • Use this when a human Google account owns or can edit the spreadsheet.
  • Reconnect Google if the refresh token is revoked or the account changes.
  • The Google Sheets API must be enabled in the Google Cloud project for the OAuth client.

Service account

Service accounts are better for production automation. Paste the service account email and private key, then share the target spreadsheet with that service account email as an editor.

  • Use this when the spreadsheet should not depend on a person's Google account.
  • Keep the private key secret and rotate it if it is exposed.
  • Most 403 errors with service accounts mean the spreadsheet was not shared with the service account email.

How rows are written

Google Sheet rows can be shaped in three ways. Choose explicit payload fields when you care about stable columns. Use metadata when the sheet is mainly for tracing. Leave both off for a quick auto-flattened payload export.

Google Sheet destination row layout modes for payload fields, metadata columns, and auto-flattened payload values.
Payload fields define column order. Metadata is a separate row mode. Empty fields with metadata off auto-spreads payload values across columns.

Payload fields

Payload fields are dotted paths. Write one path per line in the dashboard. FastHook reads those values in order and appends one row per delivered event.

Payload fields
customer.name
customer.email
order.total
order.currency

You can also include payload. at the start of a path, for example payload.customer.email. Both forms are accepted.

Include metadata

Include metadata writes FastHook delivery fields such as delivered_at, event_id, request_id, connection_id, event_data_id, team_id, source_id, and destination_id.

If payload fields are filled, the dashboard disables metadata because explicit fields define the row layout. If metadata is enabled, value input is written as RAW.

Auto-flatten payload

If payload fields are empty and metadata is off, FastHook flattens the payload recursively and writes payload values across the row. This is useful for quick tests, but explicit payload fields are better for production spreadsheets.

API examples

Create a Google Sheet destination with OAuth2 credentials

OAuth2 destination
curl -X POST "https://api.fasthook.io/v1/destinations" \
  -H "Authorization: Bearer fhp_xxx" \
  -H "x-team-id: tm_3b5335b627084a838b" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer events sheet",
    "type": "GOOGLE_SHEET",
    "config": {
      "spreadsheet_id": "1xcIMwZ...",
      "sheet_name": "Sheet1",
      "value_input_option": "RAW",
      "insert_data_option": "INSERT_ROWS",
      "columns": ["customer.name", "customer.email", "order.total"],
      "include_metadata": false,
      "auth_type": "GOOGLE_OAUTH_REFRESH_TOKEN",
      "auth": {
        "client_id": "google-client-id",
        "client_secret": "google-client-secret",
        "refresh_token": "google-refresh-token"
      }
    }
  }'

Create a Google Sheet destination with a service account

Service account destination
curl -X POST "https://api.fasthook.io/v1/destinations" \
  -H "Authorization: Bearer fhp_xxx" \
  -H "x-team-id: tm_3b5335b627084a838b" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Audit sheet",
    "type": "GOOGLE_SHEET",
    "config": {
      "spreadsheet_id": "1xcIMwZ...",
      "sheet_name": "Audit",
      "value_input_option": "RAW",
      "insert_data_option": "INSERT_ROWS",
      "columns": null,
      "include_metadata": true,
      "auth_type": "GOOGLE_SERVICE_ACCOUNT",
      "auth": {
        "client_email": "writer@project.iam.gserviceaccount.com",
        "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
      }
    }
  }'

Connect a source to the sheet

Connect source to sheet
curl -X POST "https://api.fasthook.io/v1/connections" \
  -H "Authorization: Bearer fhp_xxx" \
  -H "x-team-id: tm_3b5335b627084a838b" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "orders-to-google-sheet",
    "source_id": "src_q6z62b6py5o79b",
    "destination_id": "des_google_sheet",
    "rules": []
  }'

Send a test event

Test webhook
curl -X POST "https://hook-xxxxxx.fasthook.io/" \
  -H "Content-Type: application/json" \
  -d '{
    "customer": {
      "name": "Alice",
      "email": "alice@example.com"
    },
    "order": {
      "total": 49,
      "currency": "USD"
    }
  }'

Value input and insert mode

FastHook supports Google Sheets RAW and USER_ENTERED value input options. Use RAW for stable logs and identifiers. Use USER_ENTERED only when you want Google Sheets to interpret values as formulas, dates, or numbers.

The dashboard does not show an insert mode selector. Google Sheet destinations should append rows with insert_data_option: "INSERT_ROWS".

API callers may omit range. FastHook derives it from sheet_name and writes to A:Z by default.

Google Sheets rate limits

Google Sheets API write quota is 300 requests per minute per project and 60 requests per minute per user per project. FastHook uses the safer per-user quota for a single GOOGLE_SHEET destination.

In the dashboard, Google Sheet destinations are capped at 1/second or 60/minute. If the API payload omits rate_limit, FastHook stores rate_limit: 60 and rate_limit_period: "minute".

Troubleshooting

  • 403 Forbidden: check that Google Sheets API is enabled and the spreadsheet is shared with the OAuth user or service account.
  • 400 Bad Request: check spreadsheet_id, tab name, and whether the sheet exists.
  • No new row: inspect the event and attempt, then confirm the destination is connected to the source through an enabled connection.
  • Wrong columns: use payload fields for stable column order instead of relying on auto-flattened payload shape.
  • OAuth stopped working: reconnect Google in the destination editor to refresh the stored credentials.

Google Sheet destination FAQ

Can FastHook send webhook events to Google Sheets?

Yes. FastHook supports GOOGLE_SHEET as a destination type. Routed events are written through the Google Sheets values.append API.

Which auth method should I use?

Use OAuth2 login for a fast dashboard setup. Use a service account for production automation, especially when spreadsheet access should not depend on a human Google account.

Can I choose which payload fields become columns?

Yes. Fill Payload fields with dotted paths such as customer.email or order.total. FastHook writes those values in order.

Related guides