# Integrating with Google Sheets

Use the Google Sheets connector to import your spreadsheets into Drivetrain.

### Prerequisites

Before connecting your Google account, ensure the following:

* You have **Admin privileges** in Drivetrain.
* Your **Google account** has access to the Sheets you want to import.
* You are **signed into the same Google account** in your browser that you’ll connect to Drivetrain.
* Your organization’s Google settings allow **third-party app connections**.

### Setting Up the Integration

#### Step 1: Connect your Google Account

1. In Drivetrain, go to the **Data** **page** and click **+** to add a new connector.
2. Select **Google Sheets** from the list.
3. In the pop-up, click **Connect Google Account**.
4. **Sign in to your Google account** (or select it if already signed in).
5. **Grant Drivetrain permission** to access your Sheets and click **Continue**.
6. You’ll be **redirected back to Drivetrain** once the connection is successful.

<figure><img src="/files/8k3plxNUZ7Scc26o4zkP" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Your **Google account** is now linked to **Drivetrain**.
{% endhint %}

#### Step 2: Import a Google Sheet

1. **Open the Google Sheet** you want to import.
2. **Copy the URL** of the sheet.
3. Back in Drivetrain, **paste the sheet’s URL** in the field provided and click **Add**.
4. Once added, the sheet will appear as a **table** in your data workspace.

<figure><img src="/files/KGRAlU1JvkWrSqu2qxoB" alt=""><figcaption></figcaption></figure>

#### Step 3: Add More Sheets

You can import additional sheets from the same Google account anytime.

1. Click **Add data** within the **Google Sheets connector.**
2. Paste **another sheet’s URL.**
3. Click **Add**.

<figure><img src="/files/fWFfDY22Fvvqld7BuCCj" alt=""><figcaption></figcaption></figure>

### Best Practices for Uploading Datasets

When importing a Google Sheet, Drivetrain automatically detects whether it’s a Transaction or Time series dataset. To ensure the upload completes successfully and the data is structured correctly, follow the format requirements below.

#### General requirements

These apply to all Google Sheets datasets:

* The table starts from **cell A1**.
* **Row 1** contains clear, unique column headers.
* **Column A** is the first data column.
* Each sheet contains **only one table**.
* Supported date formats: `YYYY-MM-DD`, `MM-DD-YYYY`, `YYYY/MM/DD`, `MM/DD/YYYY`.
* The sheet must be accessible from the **same Google account** you connected to Drivetrain.

#### If your sheet is a Transaction dataset

Use this format when each row represents a **record or event** — for example, a deal, invoice, or journal entry.

* Each row corresponds to a **unique transaction or record**.
* Include all relevant columns for that record (such as dates, IDs, and status fields).

<figure><img src="/files/L60sbWlt1mh1nfrcySm9" alt=""><figcaption></figcaption></figure>

#### If your sheet is a Time series dataset

Use this format when your data tracks **values across time periods** — for example, ARR by month or sales by week.

* Each row corresponds to a **unique entity** (such as a customer, account, or region).
* The first column lists **names or identifiers** for each entity.
* Each time period (e.g., month) appears as a **separate column**.
* Use consistent, valid date headers for time columns.
* Drivetrain will automatically **unpivot or flatten** your data to make it suitable for analysis.

<figure><img src="/files/f7GhWCl1qNZMLUtzIwsL" alt=""><figcaption></figcaption></figure>

### Syncing and Refresh

Once connected, your Google Sheets data is automatically synced with Drivetrain at regular intervals.\
You can also trigger a **manual refresh** at any time from the data workspace.

### FAQ

<details>

<summary><strong>Can I automatically refresh data from a Google Sheet?</strong></summary>

Yes. Once a Google Sheet is connected, Drivetrain will sync it automatically at predefined intervals. You can also trigger a manual sync if you’ve updated the sheet recently.

</details>

<details>

<summary><strong>Can I connect multiple Google Sheets?</strong></summary>

Yes. You can connect multiple sheets from the same Google account by clicking **Add data** on the connector. See the exact steps [here](#step-3-add-more-sheets).

</details>

<details>

<summary><strong>What if my Google Sheet dataset isn’t loading?</strong></summary>

Check that:

* The sheet starts at cell A1 and has headers in the first row.
* It’s shared with the Drivetrain service account or has link access enabled.
* You’ve connected the same Google account that owns or can view the sheet.
* The sheet’s URL is accessible from your Drivetrain workspace.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/spreadsheets/integrating-with-google-sheets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
