Sign inGet Started

TownHall + Google Sheets Integration

Automatically log all form submissions to Google Sheets. Create a live database of responses without any manual data entry.

Get Started FreeIntegration Docs

Free tier available · No credit card required · View docs

Features

Automatic row creation for each submission
Column headers from form fields
Timestamp and metadata logging
Multiple sheets per form
Formulas work with live data
Share sheets with team

How to Set Up

1

Create a Google Sheet

Create a new Google Sheet where submissions will be logged.

2

Set Up Apps Script

Go to Extensions → Apps Script and paste our webhook handler code.

3

Deploy as Web App

Deploy the script as a web app and copy the deployment URL.

4

Add to TownHall

Paste the Google Apps Script URL as a webhook in TownHall.

Code Example

JavaScript
// Google Apps Script for TownHall webhook
function doPost(e) {
  const sheet = SpreadsheetApp.getActiveSheet();
  const data = JSON.parse(e.postData.contents);
  
  // Get or create headers
  let headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
  if (headers[0] === '') {
    headers = ['Timestamp', 'ID', ...Object.keys(data.submission.data)];
    sheet.getRange(1, 1, 1, headers.length).setValues([headers]);
  }
  
  // Add new row
  const row = headers.map(h => {
    if (h === 'Timestamp') return new Date().toISOString();
    if (h === 'ID') return data.submission.id;
    return data.submission.data[h] || '';
  });
  
  sheet.appendRow(row);
  return ContentService.createTextOutput(JSON.stringify({success: true}));
}

Use Cases

Lead tracking spreadsheets
Survey response analysis
Event registration lists
Support ticket logging
Team accessible databases

Frequently asked questions

Common questions about integrating TownHall with Google Sheets.

Connecting TownHall to Google Sheets is straightforward. Create a new Google Sheet where submissions will be logged. The integration typically takes less than 10 minutes to set up.

Yes! TownHall webhooks and integrations work on all plans, including the free tier. You can connect Google Sheets to your forms without upgrading to a paid plan.

TownHall sends all form submission data to Google Sheets, including all form fields, submission metadata (timestamp, IP address), and form information. You can customize the payload format if needed.

Absolutely! You can connect multiple integrations to a single form. For example, you can send submissions to both Google Sheets and Slack simultaneously. There's no limit on the number of integrations per form.

TownHall automatically retries failed webhook deliveries up to 3 times with exponential backoff. If all retries fail, you'll receive an error notification, and the submission will still be stored in your TownHall dashboard.

Most integrations require minimal technical knowledge. Google Sheets integration typically involves copying a webhook URL and pasting it into your TownHall form settings. Our documentation provides step-by-step instructions.

Start collecting data in minutes

No backend code required. Just paste a URL and you're live.

No credit card required • Free tier forever