# Google Drive

> Let your assistants search and read your Google Drive, including shared drives, and save new files into a folder you pick.

Google Drive is where most companies keep their plans, contracts, budgets, and decks. Once you connect it, you can ask about your files in plain words ("what does the Q3 plan in my Drive say?") and your assistants search Drive, open the files they need, and answer with a link to each one they used. Ask them to save something ("put this summary in the Board folder") and they find the folder you mean and save a new file there.

## At a glance

| | |
| --- | --- |
| Category | Files and storage |
| Connects with | Your Google sign-in, through Composio |
| Access | Reads and saves new files on its own |
| Used by | The CEO in chat, and every assistant |

## What assistants can do

| Ability | How it runs |
| --- | --- |
| Search files by name and by the text inside them, in My Drive and shared drives | Reads on its own |
| Read Google Docs, Sheets (every sheet), and Slides | Reads on its own |
| Read Word, Excel, PowerPoint, CSV, Markdown, and text files | Reads on its own |
| List a folder, a shared drive, or your most recently changed files | Reads on its own |
| Find a folder by name and show its full path | Reads on its own |
| Save a new Google Doc, Google Sheet, or text file into a folder you pick | Runs on its own |
| Change, move, share, or delete a file that is already there | Never |

Long files are read a page at a time, so an assistant reads only as far as it needs.

## Connect it on stellarfirm.ai

1. Open [Integrations](https://stellarfirm.ai/app/integrations) and pick **Google Drive**.
2. Press **Sign in to Google Drive**. You sign in with Google through Composio, the service StellarFirm connects apps with, so Google shows Composio's app. Pick the Google account your assistants should work with.
3. Google asks you to let that app work with your Google Drive files. Press **Allow**. Google offers no narrower permission for saving into a folder you already have, so it reads broader than what StellarFirm does: your assistants read files, and save a new file on their own. StellarFirm refuses to change, move, share, or delete a file.
4. You come back to the Google Drive page, which now says **Connected**.
5. Ask in chat: "find the latest budget in my Drive and summarize it".

There is nothing to install and nothing to paste. Composio, the service StellarFirm connects apps with, keeps your sign-in.

### If your company uses Google Workspace

Your Workspace administrator decides which apps people may sign in to. If Google says the app is blocked or needs approval, send your administrator the steps in [For IT administrators](/docs/trust/it-administrators#google-workspace), then sign in again.

## Saving a file

1. Ask in chat: "save this summary as a doc in the Board folder in my Drive".
2. The assistant looks for folders with that name. When more than one fits, or none does, it asks you which one, with each folder's full path.
3. It writes the file and saves it into that folder. The assistant tells you the file's name, whether it becomes a document, a spreadsheet, or a text file, and the folder's full path in its answer.
4. The assistant answers with the file's link.

Markdown becomes a Google Doc and CSV a Google Sheet, so the file opens as a normal Drive file. A new file never replaces one with the same name. If the folder changed name since the assistant found it, nothing is saved and the assistant looks again.

If you connected Google Drive before saving was possible, the Google Drive page says **Connect again to allow saving**. Your assistants keep reading until you do.

## Connect it in the desktop app

The desktop app connects Drive with a Google Cloud app your company owns:

1. In Google Cloud, create a project, turn on the **Google Drive API**, and create an **OAuth client** (Web application).
2. Sign in once with that client and the read-only Drive permission to get a refresh token. The desktop app reads with it; saving to Drive from chat is on stellarfirm.ai for now.
3. On the computer that runs your assistants, set `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, and `GOOGLE_DRIVE_REFRESH_TOKEN`.
4. Switch Google Drive on and to live in the assistants' configuration.

## Pause or disconnect

- To end the connection, remove Composio from your Google account under **Security, Your connections to third-party apps and services**.
- If you connected Drive with StellarFirm's own sign-in before, the Google Drive page keeps it under **Earlier sign-in**: **Turn off** keeps it but stops your assistants reading Drive with it, and **Disconnect** deletes it from StellarFirm and tells Google to end that access.

## Good to know

- Assistants see exactly what your Google account can see. Sign in with an account that has access only to what they should read, if you want a tighter boundary.
- PDFs, pictures, and videos are listed but not read from Drive. Download a PDF and attach it to the chat, and the assistant reads it.
- A file larger than 20 MB is not read from Drive. Attach it to the chat instead.
- Reading a file never changes it, and Google's own sharing settings never change. A saved file takes the sharing of the folder it goes into.
- Calls to Google Drive do not use StellarFirm credits. Only the assistant's own thinking does, as with every answer.

## Prompts

```prompt title="Summarize a document"
Find the Q3 plan in my Drive and summarize the goals, the owners, and the dates.
```

```prompt title="Answer from a spreadsheet"
Accountant, open the budget spreadsheet in my Drive and tell me which teams are over budget this quarter, with a link to the file.
```

```prompt title="Save a summary"
Summarize this week's sales calls and save it as a doc in the Sales folder in my Drive.
```

```prompt title="Check a contract"
Legal, find the latest signed vendor agreement in Drive and give me a clause checklist with the renewal date.
```

---

Source: https://stellarfirm.ai/docs/integrations/google-drive
