- Store and retrieve dynamic data without building a custom API
- Log call information for tracking or reporting
- Access lookup tables (pricing, product info, FAQs)
- Track form submissions or booking requests
Capabilities
- Read data: Query spreadsheet cells, rows, or ranges
- Write data: Append new rows or update existing cells
- Search: Find specific values within a spreadsheet
Getting started
Prerequisites
- A Google account with access to Google Sheets
- The spreadsheet(s) you want to connect
- PolyAI project access
Step 1: Prepare your spreadsheet
- Create or open the Google Sheet you want to use
- Ensure the first row contains clear column headers
- Note the Spreadsheet ID from the URL:
Step 2: Create a service account
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Sheets API
- Navigate to APIs & Services → Credentials
- Click Create Credentials → Service Account
- Fill in the service account details and create
- Click on the service account, then Keys → Add Key → Create new key
- Select JSON and download the key file
Step 3: Share the spreadsheet
- Open your Google Sheet
- Click Share
- Add the service account email (found in your JSON key file) as an editor
- Click Send or Share
Step 4: Provide credentials to PolyAI
Share the following with your PolyAI team:- Service account JSON key file (securely transferred)
- Spreadsheet ID(s)
- Sheet names and structure description
Use cases
Lookup tables
Store reference data that your agent can query:| Product Code | Name | Price | Availability |
|---|---|---|---|
| SKU-001 | Widget A | $19.99 | In Stock |
| SKU-002 | Widget B | $29.99 | Limited |
Call logging
Append call data for tracking:| Timestamp | Caller Number | Intent | Resolution |
|---|---|---|---|
| 2024-01-15 10:30 | +1234567890 | Booking inquiry | Completed |
Dynamic content
Store content that changes frequently:| Topic | Response |
|---|---|
| Holiday hours | We’re closed Dec 25-26 |
| Special offer | 20% off all bookings this week |
Limitations
- Rate limits: Google Sheets API has usage quotas; high-volume operations may require optimization
- Data size: Best suited for small to medium datasets; large datasets should use a proper database
- Concurrent access: Multiple simultaneous writes may cause conflicts; design your sheet structure accordingly
- Latency: API calls add slight delay compared to cached data
Best practices
- Keep data clean: Use consistent formatting and avoid merged cells
- Use named ranges: Makes queries more reliable than cell references
- Limit sheet size: Archive old data to maintain performance
- Test thoroughly: Verify read/write operations before going live

