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

# Connect a Google Sheet or Drive file

> Connect a Google Sheet, or an Excel or CSV file in Google Drive, so Ari imports it into your Model and updates the Model when the file changes. Google Drive can also hold PDFs, Docs, and other files for Ari to read.

Connect a Google Sheet when numbers you still keep in a spreadsheet should feed your Model, such as a hiring tracker or a pricing table. Ari imports the spreadsheet's visible tabs, rebuilds them in your Model, and re-reads it every night, so a change you make in the sheet reaches cfo.ai without a new upload. Use Google Drive to connect an Excel workbook or a CSV file the same way, and to give Ari documents such as contracts, PDFs, and Google Docs to read.

## Before you start

* A Google account that can open the file.
* A started trial or an active plan with a free connection slot. Every Google Sheets connection in a workspace shares one slot, and so does every Google Drive connection. See [Standard and premium integrations](https://docs.cfo.ai/reference/integrations.md#standard-and-premium-integrations).

cfo.ai can open only the files you pick in Google's file picker, nothing else in your Drive. You can remove its access from your Google account at any time.

## Connect the file

> [tab] Ask Ari
>
> In a chat, ask Ari to connect the sheet and say what it holds:
>
> > Connect our hiring tracker from Google Sheets and use it for the headcount plan.
>
> Ari opens the connection manager with Google Sheets. Select **Connect**, sign in with Google, and pick the file. Ari imports it in this chat, so it can ask you about the sheet while it works.

> [tab] By hand
>
> **1. Open the connection manager**
>
> In the sidebar, point at **Connections** and select **+** (**Add integration**).
>
> **2. Choose Google Sheets or Google Drive**
>
> On the **Integrations** tab, select **Connect** on **Google Sheets** for a spreadsheet, or on **Google Drive** for an Excel workbook (`.xlsx`), a CSV file, or several files at once. Both are listed under **Data upload** when you filter the directory by type.
>
> **3. Sign in and pick the file**
>
> Sign in with Google. Google's file picker opens; choose the file. In Google Drive you can choose several files of any type. Each Google Sheet, Excel workbook, or CSV file you choose becomes its own connection, and Ari imports each one. Ari reads the other files, such as PDFs and Docs, when you ask about them. The card reads **Opening Google authentication…**, **Choosing in Google…**, **Completing connection…**, and then **Connected**.
>
> **4. Watch the import**
>
> If none of the files you chose is a spreadsheet, nothing is imported, and the row says so; see [Google Drive](https://docs.cfo.ai/reference/integrations.md#google-drive). Otherwise each spreadsheet has its own row, and Ari imports it in the background. Each row reads **Waiting for the first sync to read this file…**, then **Ari is importing this file…**. When the import is done, it reads **Imported to** and the Page Ari built, with **Ari updates the model when the file changes.**

If you close Google's picker without choosing a file, the connection stays unfinished and reads **Setup not finished**. Select **Finish setup** on it to pick the file.

## What Ari builds from the file

Ari reads the spreadsheet's visible tabs with their formulas, values, and number formats, and the hidden cells they read; a hidden tab is otherwise left out unless you name it. It rebuilds the file in your Model the way it [imports a spreadsheet model](https://docs.cfo.ai/guides/import-a-spreadsheet-model.md): tabs that hold assumptions, calculations, or reports become Pages, repeated sections become Dimensions, and formulas become cfo.ai formulas. A tab or file of plain records, such as a list of transactions, becomes no Page; it is imported as data.

## Keep the file in sync

cfo.ai re-reads the file every night, and when you ask Ari to refresh it. When a value, a formula, a tab, or a defined name changed, Ari updates the parts of your Model that came from the changed sections. Edits you made in cfo.ai to sections that did not change stay. A modeling choice you made with Ari after the import, such as booking revenue from invoices instead of the sheet's formula, also stays when its section changes. Ari keeps it when it recorded the choice in its memory or on the import summary Page, the Page that the connection's **Import** section links to; see [The connection's page](https://docs.cfo.ai/reference/connection-statuses.md#the-connections-page). The update's report, in the chat that handles the import, names each difference it kept for that reason. When the search for those saved choices fails or takes too long, the update still starts, and Ari is told that the saved choices were not included, so it can look them up itself. A sync that finds the same content starts no update and uses no AI usage, and the row adds **The last sync found no change.** A change to formatting alone, such as colors, column widths, or comments, starts no update either.

Where the update happens follows where you connected the file. A file connected from a chat updates in that chat. A file connected from the connection manager updates in the background, and Ari opens a chat with you only when it needs you.

When the file changes again while an earlier update of it is still running or waiting for your answer, the new version goes to that update instead of starting another, and older updates of the same file that were still waiting are withdrawn. The chat says so, starting **Superseded tasks withdrawn**, and repeats a question that is still open; see [Messages in a chat](https://docs.cfo.ai/reference/connection-statuses.md#messages-in-a-chat).

A tab or section that Ari imported as data, such as a long list of transactions, is reloaded from the new version into the same data source. Connecting the file was your decision that each new version updates your Model, so the update does not stop to ask you before replacing those rows. Elsewhere, replacing a data source's rows still waits for your confirmation.

## Limits

* One spreadsheet imported per connection. Choosing several spreadsheets in Google Drive makes one connection for each, and all of them share Google Drive's one slot. If some of the files connect and others do not, select **Retry** in the dialog to finish the same pick; see [Messages while connecting](https://docs.cfo.ai/reference/connection-statuses.md#messages-while-connecting). The duplicate rule, the connect-link rule, and the other files a Google Drive connection holds are in [Google Drive](https://docs.cfo.ai/reference/integrations.md#google-drive).
* A Google Sheet can be up to 50 MB when exported as an Excel workbook. An Excel or CSV file in Drive can be up to 500 MB, the same as a file you attach to a chat. A CSV file over 50 MB is attached as a chat file only, not a data source; see [Limits](https://docs.cfo.ai/reference/limits.md).
* A larger file shows **This file is too large to import. Make it smaller and the next sync imports it.**

## If something goes wrong

* **Ari stopped before finishing this import. The next sync tries again.** The next nightly sync resumes it, or ask Ari to refresh the connection now.
* **Ari stopped before finishing this import. Continue in the chat that connected it.** Open that chat and ask Ari to continue.
* If either import stopped to ask you a question, the question waits in a chat, and answering it continues the import. When a newer version of the file arrives while the question waits, the newer version takes over the import that was waiting, and only that import's question stays open; the chat repeats it. Older waiting imports of the same file are withdrawn, and their questions no longer need answers. [Messages about uploaded files](https://docs.cfo.ai/reference/connection-statuses.md#messages-about-uploaded-files) says which chat for each message.

For other problems, see [Fix a connection that needs attention](https://docs.cfo.ai/guides/fix-a-connection.md).

## Related

* [Import an existing spreadsheet model](https://docs.cfo.ai/guides/import-a-spreadsheet-model.md)
* [Upload a CSV as a data source](https://docs.cfo.ai/guides/upload-a-csv.md)
* [Refresh data or change when it refreshes](https://docs.cfo.ai/guides/refresh-data.md)
* [Integrations directory](https://docs.cfo.ai/reference/integrations.md#google-sheets)


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