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

# Google Sheets

> Connect numeric metrics from a Google spreadsheet in Costory and query them as external metrics in Advanced Explorer.

Connect numeric metrics from a spreadsheet. Costory reads the sheet in place. You map a date column and the metric columns, then query them in [Advanced Explorer](https://docs.costory.io/setup/usage-metrics#query-after-you-connect).

![Connect Google Sheets page with sheet-shape instructions and Create a new Google Sheet](https://mintcdn.com/costory/7N_qRRx_7ACcj7QT/images/external-metrics/connect-google-sheets.png?fit=max\&auto=format\&n=7N_qRRx_7ACcj7QT\&q=85\&s=73bc4e7b7092d7b63853dd4e23d0db20)

Connect Google Sheets: sheet shape on the left, Connection details on the right

> [tab] Manual setup
>
> **1. Open the Google Sheets tile**
>
> Go to [Integrations](https://app.costory.io/integration), click **+ Add integration**, then under **External metric** choose **Google Sheets**. The connect URL is `/integration/new/google-sheets/external-metrics`.&#x20;
>
> **2. Shape the sheet**
>
> The first row is the header. Dates must be `YYYY-MM-DD` or `YYYY/MM/DD`. Metric columns must be numeric.
>
> | date | metric1 | metric2 |
> | - | - | - |
> | 2024-01-01 | 42 | 123 |
>
> **3. Paste the Sheet ID**
>
> Paste the Sheet ID or the full spreadsheet URL in **Connection details**. Copy the ID from the sheet URL, between `/d/` and the next `/`.
>
> **4. Share the sheet**
>
> Share the spreadsheet with `importer-sheets@costory.io`. Sheets created in-app are already shared.&#x20;
>
> **5. Create a starter sheet (optional)**
>
> Click **Create a new Google Sheet** to make a starter sheet with a date column and a sample metric. Costory fills the Sheet ID for you.
>
> **6. Validate, then map columns**
>
> Click **Validate**. Success looks like: **Validation succeeded. Sheet headers loaded. Matching date and numeric columns were pre-selected.**
>
> Map **Metrics columns** (columns Costory reads as metrics) and **Date column**. Costory checks that metric columns are **Numeric** and that dates look valid.
>
> **7. Save the connection**
>
> Click **Save connection**. The source appears under **Integrations** > **Data sources** with the **Metrics** badge.
>
> ## After you save
>
> On the source row menu you can:
>
> * **View metric**
> * **Rename**
> * **Edit definition**
> * **Create formula**
> * **Delete**
>
> When you **Edit definition** and add a metric, Costory appends a column to the sheet header.
>
> Query the series in **Advanced Explorer**. Click **+ Add Metric**, use the **integrations** chip, then pick the Sheets source. See [Query after you connect](https://docs.costory.io/setup/usage-metrics#query-after-you-connect).
>
> ![Advanced Explorer metric picker open on Cost, with integrations listing Tsuga and BigQuery](https://mintcdn.com/costory/7N_qRRx_7ACcj7QT/images/external-metrics/explorer-metric-picker.png?fit=max\&auto=format\&n=7N_qRRx_7ACcj7QT\&q=85\&s=83a364e7392e46a8df87ec385843e3f9)
>
> Metric picker chips: cost, usage, metric, budget, and integrations
>
> ![Advanced Explorer Period menu listing Custom dates, trailing ranges, MTD, QTD, YTD, and Last Invoice Month](https://mintcdn.com/costory/7N_qRRx_7ACcj7QT/images/external-metrics/explorer-period-dropdown.png?fit=max\&auto=format\&n=7N_qRRx_7ACcj7QT\&q=85\&s=7c5f901ae6651511c71163f3bb3254c2)
>
> Period dropdown with Trailing 45 Days selected
>
> > [!NOTE]
> >
> > **Save connection** stays disabled until validation succeeds.

> [tab] Terraform
>
> Not supported.

## Related pages

> [card] [Metrics Correlation](https://docs.costory.io/setup/usage-metrics)
>
> All external metric sources and the Explorer query path.

> [card] [Unit Economics](https://docs.costory.io/features/unit-economics.md)
>
> Divide cloud cost by a Sheets metric.

> [card] [BigQuery](https://docs.costory.io/setup/usage-metrics/bigquery.md)
>
> Query warehouse tables live instead of a spreadsheet.

> [card] [Shared Cost Allocation](https://docs.costory.io/features/tagging/shared-cost-allocation.md)
>
> Split shared costs with a usage metric.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.