The Google Sheets integration allows you to send survey responses directly to Google Sheets as they arrive. Perfect for data analysis, reporting, and sharing insights with your team.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/formbricks/formbricks/llms.txt
Use this file to discover all available pages before exploring further.
What Gets Synced
When a response is submitted to a linked survey:- Each response adds a new row to your sheet
- The first row contains question labels (headers)
- Selected questions are mapped to columns
- Data syncs in real-time as responses arrive
- Existing data in the sheet is preserved
Setup for Formbricks Cloud
Navigate to Integrations
In your Formbricks dashboard, go to Configuration > Integrations and click Connect on the Google Sheets card.

Authorize Google Account
Select your Google account and grant Formbricks permission to:
- View your email address (for identification)
- Access Google Sheets in your Google Drive
Prepare Your Sheet
Create a Google Sheet or select an existing one. Formbricks will:
- Add headers in row 1
- Append responses starting from row 2
Configure Sync
- Paste the Google Sheet URL
- Select the survey to sync
- Choose which questions to include as columns
-
Click Link Sheet
The sheet URL should look like:
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/editSelf-Hosted Setup
To enable Google Sheets integration on a self-hosted instance, you need to create a Google Cloud project with OAuth credentials.This setup requires a Google Cloud account and familiarity with Google Cloud Console.
Create Google Cloud Project
- Go to Google Cloud Console
- Create a new project or select an existing one
Enable Google Sheets API
- In your project, go to APIs & Services > Library
- Search for “Google Sheets API”
- Click Enable
Configure OAuth Consent Screen
- Go to APIs & Services > OAuth consent screen
- Select External user type (unless using Google Workspace)
- Fill in app information:
- App name: “Formbricks”
- User support email: Your email
- Developer contact: Your email
- Add scopes:
auth/userinfo.emailauth/spreadsheets
- Save and continue
Create OAuth Credentials
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Choose Web application
- Add authorized redirect URI:
For local:
http://localhost:3000/api/google-sheet/callback
Data Format
Your Google Sheet will be structured as follows:| Question 1 | Question 2 | Rating | Submitted At |
|---|---|---|---|
| Answer 1A | Answer 2A | 5 | 2024-03-15 10:30 |
| Answer 1B | Answer 2B | 4 | 2024-03-15 11:45 |
- Row 1: Question labels (headers)
- Row 2+: Response data (one row per response)
- Headers are updated when you link the sheet
- Long text is automatically truncated if it exceeds Google Sheets’ cell limit
API Implementation
The integration uses Google Sheets API v4:Authorization Flow
Writing Headers
Appending Responses
apps/web/lib/googleSheet/service.ts:writeData().
Permissions & Privacy
What Formbricks Accesses
Your Email ID
Your Email ID
Used for authentication and to identify your Google account. (See code)
Google Sheets Names and IDs
Google Sheets Names and IDs
Fetched to show you available sheets for linking.
Write Access to Selected Sheet
Write Access to Selected Sheet
Only the specific sheet you link receives write access for adding response data. (See code)
Formbricks stores minimal personal information and only accesses sheets you explicitly select.
Remove Integration
Troubleshooting
Permission denied error
Permission denied error
Ensure:
- You have edit access to the Google Sheet
- The sheet isn’t protected or restricted
- You haven’t revoked Formbricks’ access in Google account settings
Responses not appearing
Responses not appearing
Check:
- The survey is linked to the correct sheet
- The sheet URL is valid and hasn’t changed
- Responses are fully submitted (not partial)
- The sheet hasn’t been deleted
Token expired
Token expired
Formbricks automatically refreshes expired tokens. If you see persistent errors:
- Delete the integration
- Reconnect to get a fresh OAuth token
Headers not updating
Headers not updating
Headers are set when you link the sheet. If you change survey questions:
- Unlink the sheet
- Re-link it to update headers
Truncated text
Truncated text
Google Sheets has a 50,000 character limit per cell. Long responses are automatically truncated. Consider:
- Using shorter question types
- Storing full responses in a database instead
- Using the Notion integration for long-form content
Best Practices
Use Dedicated Sheets
Create a new sheet for each survey to keep data organized and avoid conflicts
Add Formulas
Use Google Sheets formulas to calculate averages, NPS scores, or sentiment analysis
Create Charts
Build visualizations to track trends and share insights with stakeholders
Set Up Filters
Use filters and pivot tables to analyze specific segments or time periods
Advanced: Sheets API Limits
Google Sheets API has rate limits:- Read requests: 300 per minute per project
- Write requests: 300 per minute per project
- Cells: 10 million cells per spreadsheet
- Using webhooks for custom processing
- Splitting responses across multiple sheets
- Implementing batching logic in your own webhook handler



