Google Drive
Company documents · publisher buff · version 1.1.0
Google Docs, Sheets and Slides as context for answers, and questions right in comments. The research report comes back as a document in the same folder.
An answer in Buff relies on a spreadsheet from Google Drive — with the names of the spreadsheet and the section. The setup form: service addresses, folders and files, the sign-in method. Instead of a service account you can sign in with your own account: a “Sign in” button appears after saving. The connection is live: seven tools, five of which only read (green). The connection check names on whose behalf the connection works and how many of the selected folders it can access. What the integration will get is written on its card in the connector’s catalogue.
Click a screenshot to open it in full. All screenshots are from a working installation.
Overview
On Drive the team keeps what is neither in the task nor in the code: a specification in a document, a plan in a spreadsheet, decisions in a presentation. The integration lets Buff read the selected folders when an answer needs them, takes questions right in comments on a document, spreadsheet or presentation and can leave the result as a document: the research report appears in the same folder where the question was asked. You can sign in with a service account — for a team — or with your own account if the Drive is personal.
Use cases
The situations it is installed for.
A marketer checks a text against the positioning
The “How we talk about the product” document is on Drive: what we say, what we do not say, which words are banned. Every new text is checked against it by hand — or not checked at all.
Result. The AI agent finds the document by the words of the question — Drive searches by content, the integration matches word forms — and answers where the text departs from the document, with quotes from it.
A budget where everything is written down
The finance team keeps the budget in a Google spreadsheet: a sheet per quarter, rows for items, columns for plan and actual. Nobody retells that spreadsheet when asking “what is in the ‘Training’ row and why?”.
Result. The AI agent reads the spreadsheet sheet by sheet — each as a table — or exactly the range needed, and answers from the rows, cutting nothing.
A question right in the document
Someone reads a specification and does not understand how it applies to their case. Going to another tool for a question is an extra step people usually skip.
Result. They write to the bot in a comment on the document. The answer arrives in the same thread and stays next to the paragraph the question was about.
A personal Drive — on your own behalf
One person wants to connect their own Drive: no service accounts, no Google Workspace administrator — “I signed in once quickly, and that was it”.
Result. Your own OAuth client, a “Sign in” button, consent in the browser — and from then on the connector refreshes access itself. The bot reads everything you can see and answers on your behalf.
Examples
What to write and what comes back. How the bot is addressed is set in the connection settings — here it is “@buff”.
+buff-bot@project.iam.gserviceaccount.com what is our migration scheme called?
a comment in any document of a selected folder
tool:
search_files + get_fileThe migration scheme’s internal name is “Verkhoturye”: the number is built as YY.MM.N. Source: the “Release procedure” document, “Migration scheme” section.
@buff which export tasks are in progress?
a question in the Buff app or a comment in the spreadsheet
tool:
get_sheetThe “Tasks” sheet has two rows about export; one is in progress — “CSV export”, estimate 3. The second, “Export encoding”, is already done. The link to the spreadsheet is below.
/research why the export breaks on Cyrillic
a comment in the procedure document
tool:
get_file + create_documentThe word after the mention picks the work: without it — a short answer, “research” — research, “task” — a draft task. The research report will appear as a new document in this folder, with a PDF next to it; a link will arrive in the thread.
@buff what does this folder have about backups?
a question in the app with a link to the folder
tool:
list_folder + search_filesThe folder has six files; two are about backups: the “Backup” document (the schedule, the retention period) and the “Restore” spreadsheet (the procedure and who approves it). Both are linked.
What it does
Reads what it needs, when it needs it
search_files searches names and content using Drive itself, and ranks what it finds by reading the text — word forms of the question and the document are matched. get_file returns a document as markdown, a spreadsheet with all its sheets, a presentation as text, a folder as a list; get_sheet one sheet or range. The model calls them itself when a question requires it: nothing is copied to us in advance or indexed, and you pay for what is actually read.
A document arrives as markdown, a spreadsheet as tables
A Google document is exported in one call to markdown — headings, lists, tables, code, links; the integration adds nothing and cuts nothing. A spreadsheet is read sheet by sheet, each as a markdown table with a header from the first row; a thousand-row sheet stays a thousand-row sheet.
Answers where the question was asked — and with a document when it is a report
A mention of the bot (by address, name or alias) or a slash command in a comment starts a question, research or a draft task; the answer arrives in the same thread. A research report is a new document in the folder of the file where the question was asked, with the text and a PDF next to it; a link arrives in the thread.
The roots are the scope
The connection lists folders and files; the bot works in them and in everything nested, and reads and writes only there; shared drives are always in view. An empty list means “everything open to the account” — that boundary was already drawn by Google itself when you shared folders.
Two ways to sign in — and the connector issues the tokens
Service account: a JSON key, folders are shared with its address, and the bot writes on its own behalf. Your own account: your own OAuth client, a one-time sign-in through the browser with a return to the connector’s page. In both cases Google issues tokens for an hour, and the connector refreshes them — the key and the refresh token stay on your machine, and the integration does not see them.
Polling instead of a webhook
Drive has no comment feed, and push notifications require a verified domain. The integration goes round the documents in scope and asks each for comments changed since reading began — every 5 seconds by default; the interval can be changed in the settings. The integration respects Google’s limits: 429 and 403 “rate limit” responses are waited out the way Google asks.
How to use it
Everything happens on the machine where the connector runs. At no step do you need to open access to your network from outside.
Step 1
Installation takes one click
Open the “Marketplace” section on the connector’s local page. Before installing you can see what the integration will get: the addresses it will be able to reach, which credentials it will ask for and how many tools the model will see. The connector downloads a signed bundle from our registry and checks the signature before writing anything to disk.
Connector← scroll the frame →
The access limits are written on the catalogue card. Step 2
For a team — a service account
In the Google Cloud console, enable the Drive API and the Sheets API, create a service account and download its JSON key. Share the folders needed with the account’s address — as you would with a colleague. In the form, choose “service account” and paste the key’s contents.
Connector← scroll the frame →
Each integration has its own form fields. Step 3
For yourself — your own account
Create an OAuth client of the “Desktop app” type in your Google Cloud project, paste the client ID and client secret, save the connection and click “Sign in”. Google returns the browser to the connector’s page; if the browser is on another machine, paste the return address into the field next to it.
Connector← scroll the frame →
You sign in once; after that the connector refreshes access itself. Step 4
Setup: roots, an alias and an interval
The addresses are filled in. Name the roots — links or identifiers of folders and files, separated by commas (empty means everything open to the account), a short name for the bot, for example `buff`, and, if you like, the polling interval.
Step 5
The same from the command line
Installing without a GUI is an equal option, not a fallback: `connector install google-drive`, then `connector instance set --plugin google-drive --version 1.0.0 --set roots=https://drive.google.com/drive/folders/… --poll 5`, and the key with `connector instance secret … --secret api --kind service_account`; for your own account, `--kind oauth2` and `connector instance signin`.
Connector← scroll the frame →
Each connection has its own set of tools and its own allowed address.
Access limits
The connector shows the same on your machine before installation. The list comes from the signed catalogue, not written here by hand.
Goes out to
only the addresses from the fields drive_apisheets_api
Credentials
api — the values stay in the connector, the integration does not see them
Webhooks
does not accept
| Tool | What it does | Access |
|---|---|---|
| search_files | Find documents, spreadsheets, presentations and folders by words in the title and text — when the answer may already be written down on Drive | read only |
| get_file | Read a whole document (markdown), a spreadsheet (all sheets), a presentation (text) or a folder (contents) — together with its discussion | read only |
| list_folder | List a folder’s contents — when the answer comes together from several files of one section | read only |
| get_sheet | Read one sheet or range of a spreadsheet — when a specific part of a large spreadsheet is needed | read only |
| get_comments | File discussions — comment threads with replies, who wrote and when | read only |
| add_comment | Write a comment on a file or reply in a discussion thread | writes |
| create_document | Create a Google document from markdown in one of the connected folders | writes |
The integration runs as a separate process under its own operating system user: it does not see the connector’s key, does not read the files of other connections and cannot reach the network past the connector. More in the security section.
Requirements
- A Google Cloud project with the Google Drive API and Google Sheets API enabled — your own, on any plan; Google Workspace is not required.
- A service account with a JSON key that the folders are shared with — or your own OAuth client of the “Desktop app” type to sign in with your own account.
- Connector 0.10 or later: credentials that the connector issues itself (service account, OAuth) were added in it; an older connector will refuse to install the integration and name both versions.
- Network access from the connector’s machine to www.googleapis.com, sheets.googleapis.com, oauth2.googleapis.com and accounts.google.com — nothing needs to be opened from your network to the outside.
- A connector run with the right to create a separate OS user for the integration (root or CAP_SETUID).
Questions
- Will the bot be able to change anything in the documents?
- No. It reads documents, spreadsheets and presentations, writes comments and creates new documents within its scope; it does not edit existing ones — the integration has no such tool at all.
- How is a service account different from my own account?
- A service account is a separate robot: it sees only what has been shared with it and writes on its own behalf; this is the option for a team. Your own account is you: the bot sees your whole Drive and answers as you; this is the option for a personal Drive. A document that a service account creates in someone else’s “My Drive” folder belongs to it; on a shared drive this does not happen.
- Google says “This app isn’t verified” — is that normal?
- Yes, for your own OAuth client in testing mode. It is your own client in your own Google Cloud project; add yourself as a test user and click “Continue”.
- How do I limit what it sees?
- In two ways at once: by what has been shared with the account in Google, and by the list of folders in the connection settings. The list works both ways, and an empty list means “everything open to the account”.
- Does a big document mean a big bill?
- A document is read whole and is not cut: a truncated procedure is a silently lost requirement. But it is read only when the model goes for it, and the answer shows which files were read.
Next
Connect Google Drive
Install the connector in your network, open its local page and install the integration from the catalogue. Nothing needs to be rebuilt.
Companies and sole traders can pay by bank transfer and receive closing documents