Webhook to Google Sheets: a template that saves every request as a new row

A webhook to Google Sheets is set up in nana800 with a ready-made template of two blocks: webhook receives data from a website or another service, and google sheet record appends it as a new row at the bottom of the sheet. No code and no server are needed: you give access to the sheet and say which field goes into which column. Your balance is topped up to $3.50 for free every month, no card needed.

Build it in the builder
The Webhook to Google Sheets (Google Sheet Record) template scheme in the nana800 builder

Chain of blocks

  1. 1

    Trigger · Webhook (trigger)

    webhook receives a request with data and passes the request body, the parameters after ? and the headers to the next block. The template uses the GET method and the "/" path, and a website form usually needs POST and a path of your own.

  2. 2

    Action · Google Sheets rows

    google sheet record adds a row at the bottom of the sheet with the append_row operation. You fill in the access method (a Google service account by default), the spreadsheet ID and which request field goes into which column.

What it is good for

  • Website form leads in a shared sheet where managers mark calls and status
  • Online store orders as rows with name, phone number, total and order items
  • Quiz or survey answers in columns, ready for filters and pivot tables
  • An event log from a CRM, a payment service or your own software, if it can send webhooks
  • A base for a bigger scheme: the same webhook can also send a Telegram alert or answer the sender

How to set it up

  1. 1

    Prepare the sheet

    Type the column names into the first row of the sheet, for example Name, Phone, Comment. The block writes values under these names and leaves the first row alone. If a column is missing, the block adds it on the right, and on an empty sheet it writes the column names itself.

  2. 2

    Create a scheme from the template

    In the builder open Templates, find the Google Sheet Record template, click Use, choose the project and scheme and click Create. In the webhook block pick the POST method and enter a path, for example /lead.

  3. 3

    Give the block access to the sheet

    In the google sheet record block choose the authorization method. OAUTH: click the connect button and sign in to a Google account that can open the sheet. SERVICE_ACCOUNT: turn on the Google Sheets API in Google Cloud, create a service account, paste its email and private key into the block, and give that email editor rights in the sheet.

  4. 4

    Point to the sheet and the columns

    Paste the whole spreadsheet address into the spreadsheet ID field. Sheet number 0 means the first sheet from the left. In the row data field write the column name on the left and insert a field from the request body on the right: form fields arrive under the same names as in the form.

  5. 5

    Turn the scheme on and send a test request

    The template has no manual start button, so turn the scheme on, click the API button in the builder and copy the webhook address. Send JSON with the form fields on the Try it tab: a new row appears at the bottom of the sheet. Then paste the address into your form settings. An enabled scheme costs $0.0042 per hour.

Services in this template

  • Webhook

    Receive website leads and service events with a webhook and answer requests with no server and no code. Free balance every month, no card needed.

  • Google Sheets

    Send leads and orders to Google Sheets without code: append rows, find, read and update them by row number. Free balance every month, no card needed.

Frequently asked questions

One row takes two basic block runs: receiving the request and writing the row, and 1,000 runs cost $1. An enabled scheme costs $0.0042 per hour. Your balance is topped up to $3.50 for free every month, no card needed. A scheme kept on around the clock for a month spends most of that on scheme hours.

The template has no response block, so the sender gets code 200 and {"finished":true,"default":true} when the scheme finishes. For your own answer, for example {"ok": true}, add the free webhook response block at the end.

As JSON or as a regular form submission, up to 20 MB. The fields end up in body, the address parameters after ? in query. The multipart/form-data format that FormData uses in JavaScript is not parsed by the webhook, and the row is written without values.

Yes. The google sheet record block also has read_rows to read rows, find_rows to find rows by a value in a column and update_row to change a row by its number. For example, find_rows before writing helps you avoid adding the same lead twice.

Open the run history of the scheme and the result of the google sheet record block: error_message holds the answer from Google. Most often the sheet is not shared with the service account email as an editor, or the Google Sheets API is not turned on in Google Cloud. A scheme that is off answers requests with code 409 and writes nothing.

Anyone who knows the address: webhooks are public, and every request adds a row. If only your data should get into the sheet, ask the sender to add a secret header and compare it with the free condition block before writing.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder