Docs-icon
Google Docs

Draft contracts and reports in Google Docs from your notes

Connect Google Docs to the AI agent: document text, paragraphs, tables and headers. The agent drafts a contract or report and edits an existing file you link it to.

How the agent works with Google Docs

The agent works with the Google Docs API v1 and opens a document by link or identifier: it reads text and paragraphs, tables, lists, headers and footers, named ranges and styles. On that basis it assembles a draft contract or report from your input, rewrites sections of an existing file, updates tables and headings, and swaps repeated amounts, dates and legal details across the whole document in one pass.

To the API a document is not continuous text but a sequence of elements with numeric positions, and any insertion shifts everything that follows. So the agent does not edit blind: it re-reads the structure first, arranges the changes so that neighbouring ones do not break each other positions, and sends them as a single batch. A replacement across the file goes by exact match — part of a word or a different letter case will not be caught by it.

For writing, the agent inserts and deletes text in place, changes text and paragraph styles, and adds tables, lists, page breaks, headers and footers. An edit lands straight in the live document and cannot be undone through the API — only the Google version history remains. That is why, before rewriting a whole section, the agent spells out what exactly it is replacing, and after the edit it re-reads the file and shows the result.

Connecting is a sign-in to a Google account in a separate window; access to documents and to the account address is requested. Google Drive is not part of that access, so a document cannot be found by title: it takes a link like docs.google.com/document/d/ID/edit or the identifier itself. A refusal on permissions comes back from the API as a code rather than as an empty document, and the agent passes it on as it is instead of pretending it saved. A long edit is cut into batches with a pause between them, so the request quota is not exhausted mid-way.

Integration scenarios

A draft contract or report

The agent assembles a document from your input — with sections, tables and lists — and returns a link to the finished file.

Edits in a document you link to

The agent changes an existing document: rewrites sections, updates tables and headings, and fixes paragraph styles.

Swapping figures and dates in a template

The agent finds repeated values across the whole document and replaces them in one pass — amounts, dates and legal details no longer need editing by hand.

Scheduled refresh of a file

On a schedule the agent rewrites the same document with fresh data, and the link recipients already have stays unchanged.

A recap of a long document

The agent reads the file you link to, walks its headings, lists and tables and returns a digest: what each section covers, which dates and amounts sit inside.

One consistent look before sending

The agent compares heading and paragraph styles across the document, brings them to a single look and adds headers, footers and page breaks where they are missing.

Google Docs examples

Docs-icon
Google Docs
Frozen chats — click a question
Замени реквизиты в договоре по ссылке

Заменил 14 вхождений по всему документу — старые реквизиты не остались нигде.

Поправил ИНН, КПП и расчётный счёт в шапке, в разделе 8 и в колонтитуле, дату договора поставил 27 июля. Сумму не трогал — скажи, если её тоже пересчитать.

Правки в договоре

Document · DOCX

How to connect

Before you connect

  • Native Google Docs files, not uploaded .docx documents
  • The right to share the document: you own it or edit it
  • A personal Google account, or an admin you can reach
  1. 1

    Sign in with the right Google account

    Access is granted to whichever account is active in the browser. With several accounts, pick the one that already has access to your working documents.

  2. 2

    Admin: allow access under “API controls”

    In Google Workspace third-party app access can be switched off: an admin turns it on at admin.google.com under “Security” → “API controls”.

  3. 3

    Under “Share” give the account “Editor”

    Open the document, click “Share”, add the chosen account and set its role to “Editor”. With “Viewer” or “Commenter” the edits are rejected.

  4. 4

    Collect links to the documents you need

    Copy addresses shaped like https://docs.google.com/document/d/DOCUMENT_ID/edit — the identifier sits between /d/ and /edit. There is no search by title.

FAQ

By signing in to your Google account in a separate window: you approve access to documents, there are no keys to copy. Give that account the Editor role on every working document — with the Viewer and Commenter roles the edits will not go through.

The structure of the document you link to: text and paragraphs, tables, lists, headers and footers, named ranges and styles. Other documents in the account never show up in the results.

Yes: it inserts and deletes text in place, replaces values across the whole file, changes text and paragraph styles, and adds tables, lists, page breaks, headers and footers.

The access we request does not include Google Drive, so there is no search by title. A document is addressed by a link like docs.google.com/document/d/ID/edit or by the identifier itself.

Related integrations

Category
Google
Connection
OAuth
Documentation
Google Docs

Connect Google Docs

Connecting takes a couple of minutes, and your data stays in your own systems.

Connect