> ## Documentation Index
> Fetch the complete documentation index at: https://docs.poly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.poly.ai/feedback

```json
{
  "path": "/integrations/google-sheets",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Google Sheets

> Connect your PolyAI agent to Google Sheets for lookups, logging, and dynamic content.

Read from and write to Google Sheets from your agent for lookup tables, call logging, or dynamic content updates during conversations.

<Note>This is a managed integration. Prepare the credentials below, then contact your PolyAI account manager to complete setup.</Note>

## Capabilities

* **Read data**: Query spreadsheet cells, rows, or ranges
* **Write data**: Append new rows or update existing cells
* **Search**: Find specific values in 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

1. Create or open the Google Sheet you want to use
2. Ensure the first row contains clear column headers
3. Note the **Spreadsheet ID** from the URL:
   ```
   https://docs.google.com/spreadsheets/d/{SPREADSHEET_ID}/edit
   ```

### Step 2: Create a service account

1. Go to the [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project or select an existing one
3. Enable the **Google Sheets API**
4. Navigate to **APIs & Services → Credentials**
5. Click **Create Credentials → Service Account**
6. Fill in the service account details and create
7. Click on the service account, then **Keys → Add Key → Create new key**
8. Select **JSON** and download the key file

### Step 3: Share the spreadsheet

1. Open your Google Sheet
2. Click **Share**
3. Add the service account email (found in your JSON key file) as an editor
4. Click **Send** or **Share**

### Step 4: Provide credentials to PolyAI

Share the following with your PolyAI representative:

* Service account JSON key file (securely transferred)
* Spreadsheet ID(s)
* Sheet names and structure description

PolyAI will store your credentials securely and configure the integration.

## 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

1. **Keep data clean**: Use consistent formatting and avoid merged cells
2. **Use named ranges**: Makes queries more reliable than cell references
3. **Limit sheet size**: Archive old data to maintain performance
4. **Test thoroughly**: Verify read/write operations before going live

## Support

For setup assistance, contact your PolyAI account manager.

## Related pages

<CardGroup cols={2}>
  <Card title="Integrations overview" href="/integrations/introduction" icon="plug">
    Browse all available integrations.
  </Card>

  <Card title="Managed services" href="/integrations/managed-services" icon="handshake">
    Other managed integrations requiring account manager setup.
  </Card>
</CardGroup>
