Google Sheets logo

Google Sheets

Read and write Google Sheets data. API key supports read-only access to public spreadsheets. OAuth supports full read/write access to any spreadsheet you have access to.

Authentication

Supported Authentication Methods

Drop in supports two authentication methods:

  • OAuth (Recommended) — full read/write access to any spreadsheet in your Google account
  • Google API Key — read-only access to publicly shared spreadsheets

Using OAuth

OAuth lets Drop in access any spreadsheet in your Google account — including private ones — and enables write operations like appending rows, updating cells, and deleting rows.

  1. In Drop in, select Google Sheets when creating a drop
  2. Choose Sign in with Google as the authentication method
  3. You'll be redirected to Google's consent screen
  4. Sign in with your Google account and grant Drop in access to your spreadsheets
  5. Once authorized, you're ready to read and write any spreadsheet in your account

OAuth uses the spreadsheets scope, which grants full read/write access to all spreadsheets in your Google account. You can revoke access at any time from your Google Account Permissions page.

Using an API Key

To connect Google Sheets with Drop in, you'll need a Google Cloud API key with the Sheets API enabled:

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Navigate to APIs & Services > Library
  4. Search for Google Sheets API and click Enable
  5. Go to APIs & Services > Credentials
  6. Click Create Credentials > API key
  7. Copy the generated API key
  8. (Recommended) Click Edit API key to restrict it to the Google Sheets API only
  9. In Drop in, select Google Sheets when creating a drop and paste your API key

Important: API key access only works with spreadsheets that are shared publicly ("Anyone with the link can view"). For private spreadsheets or write operations, use OAuth instead.

Resources:

Providing Context

All Google Sheets actions require a spreadsheet ID so the AI knows which spreadsheet to work with. You can provide it directly or let the AI extract it from a URL.

How IDs Work in Google Sheets

Every Google Sheets spreadsheet has a unique ID — the long alphanumeric string in the URL between /d/ and /edit:

docs.google.com/spreadsheets/d/{spreadsheet_id}/edit

For example, in the URL docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms/edit, the spreadsheet ID is 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms.

You can paste the full URL or just the ID in your prompt — the AI will extract the spreadsheet ID automatically.

Sheet Names and Ranges

Data is accessed using A1 notation, which combines a sheet name and cell range:

  • Sheet1!A1:D100 — rows 1-100, columns A-D of "Sheet1"
  • A:D — entire columns A through D of the first sheet
  • Summary!A1:B5 — a specific range on the "Summary" sheet

If you don't know the sheet names, ask the AI to get the spreadsheet metadata first — it will discover all sheet names and their dimensions automatically.

Column Names

The integration cannot discover column headers on its own. If your task involves reading specific columns, filtering rows, or matching values, include the column names (header row) in your prompt so the AI knows which range to target.

Available Actions

Get Spreadsheet Metadata

Retrieve metadata for a spreadsheet including its title, list of sheets, and their dimensions. Use this to discover sheet names and numeric sheet IDs before performing other operations. Works with both API key and OAuth.

Get Values

Read cell values from a range using A1 notation. Returns all rows in the specified range. To find specific records, the AI will read the relevant range and filter the results. Works with both API key and OAuth.

Batch Get Values

Read values from multiple ranges in a single request. Useful when you need data from several separate areas of a sheet or from different sheets within the same spreadsheet. Works with both API key and OAuth.

Append Values

Append one or more rows to the end of a sheet, after the last row with data. The range is used to locate the table — data is always inserted after the existing content. Requires OAuth.

Update Values

Overwrite cells in a specific range with new values. Use this to edit existing rows or update individual cells. The number of rows and columns in the provided data should match the target range. Requires OAuth.

Delete Rows

Delete a range of rows from a sheet by row index. Use Get Spreadsheet Metadata first to obtain the numeric sheet ID required for this operation. Requires OAuth.

Common Issues

403 Forbidden Error

If you receive a 403 error when accessing a spreadsheet:

  • Using API key: The spreadsheet is not shared publicly — open it in Google Sheets, click Share, and set access to Anyone with the link can view, or switch to OAuth for private spreadsheet access
  • Using OAuth: Your Google account does not have access to this spreadsheet — ask the owner to share it with you

Spreadsheet Not Found

If you receive a "not found" error:

  • Verify the spreadsheet ID is correct — it should be the long alphanumeric string from the URL between /d/ and /edit
  • Check that the spreadsheet has not been deleted or moved to trash
  • Ensure the full URL was pasted correctly if you provided a link

Invalid Range

If you receive a range error when reading values:

  • Check that the sheet name in your range matches exactly (sheet names are case-sensitive)
  • Use Get Spreadsheet Metadata first to confirm the available sheet names
  • Ensure the range uses valid A1 notation (e.g., Sheet1!A1:D100, not row/column numbers)

API Key Errors

If you receive an authentication or API key error:

  • Verify your API key is correct and has not been revoked
  • Ensure the Google Sheets API is enabled in your Google Cloud project
  • Check that the API key is not restricted to a different API

OAuth Token Expired

If you receive an "invalid credentials" or token error when using OAuth:

  • Your OAuth session may have expired — reconnect by signing in with Google again in Drop in
  • If the issue persists, revoke Drop in's access from your Google Account Permissions and re-authorize

Write Operation Errors

If an append, update, or delete operation fails:

  • Ensure you are using OAuth — write operations are not supported with API key authentication
  • For Delete Rows, make sure you are using the numeric sheetId (from Get Spreadsheet Metadata), not the sheet name
  • For Update Values, verify the range dimensions match the number of rows and columns in your data

Need help? Contact support