---
title: "Configure the Google Sheets data source | Grafana Labs"
description: "Learn how to configure the Google Sheets data source with an API key and verify the connection."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Configure the Google Sheets data source

In this milestone, you configure your Google Sheets data source with the API key you created and verify that the connection works correctly. This step establishes the authenticated connection between Grafana and the Google Sheets API.

Choosing the right authentication type ensures the data source can read the spreadsheets you need. The connection test validates that your API key is accepted and that the Google Sheets API is reachable.

**Before you start:** These steps take place on the **Google Sheets data source configuration page** (its URL looks like `/connections/datasources/edit/<uid>`). If you completed the previous milestone, you’re already there.

If not, open the configuration page now:

- Go to **Connections &gt; Add new connection**, search for and select **Google Sheets**, then click **Add new data source**. This creates a data source instance and opens its configuration page.
- Or, to edit an existing one, go to **Connections &gt; Data sources** and select your Google Sheets data source.

Don’t confuse this with the plugin **overview** page or the **Choose a data source type** list — the **Name**, **Authentication type**, and **API Key** fields only appear on the configuration page of an actual data source instance.

To configure authentication and verify the connection, complete the following steps:

1. Your data source is created with the default name **grafana-googlesheets-datasource**, shown as the editable title at the top of the page. To rename it, click the **pencil (Edit title)** icon next to the title and enter a descriptive name, for example `My Google Sheets` or `Team Budget Sheet`.
   
   > **Did you know?** The name of the data source appears on dashboard panels, so it’s important to choose a meaningful name.
2. Optionally, enable the **Default** toggle if you want this to be your default data source when creating new panels.
3. For **Authentication type**, select **API Key**.
   
   The default is **Google JWT File**, which is used for private spreadsheets. Because this path uses a publicly shared spreadsheet, select **API Key** instead. The **API Key** field only appears after you make this selection.
4. In the **API Key** field, paste the Google API key you created earlier.
   
   **Tip:** Ensure you paste the complete key without any extra spaces or characters.
5. Optionally, set a **Default Spreadsheet ID** to pre-fill new queries with a spreadsheet you use often. You can enter an ID, paste a spreadsheet URL, or leave it empty and set the ID per query.
6. Click **Save &amp; test** to save the configuration and test the connection.
   
   A successful connection displays the message “Success”.

Your Google Sheets data source is configured and connected. You can now query publicly shared spreadsheets from dashboard panels and Explore.

**Try it:** To test without your own spreadsheet, use Grafana’s [public demonstration spreadsheet](https://docs.google.com/spreadsheets/d/1TZlZX67Y0s4CvRro_3pCYqRCKuXer81oFp_xcsjPpe8/edit?usp=sharing). Add a visualization, select your Google Sheets data source, and paste the spreadsheet ID `1TZlZX67Y0s4CvRro_3pCYqRCKuXer81oFp_xcsjPpe8`. Leave **Range** empty to use the first sheet.

* * *

### Troubleshooting

Explore the following resources if you need help:

- [Troubleshoot the Google Sheets data source](/docs/plugins/grafana-googlesheets-datasource/latest/troubleshooting/)
- [Configure the Google Sheets data source](/docs/plugins/grafana-googlesheets-datasource/latest/configure/)
