Caplets Catalog
official
spiritledsoftware/caplets

Google Docs

Read, create, and edit Google Docs documents through the Google Docs API Discovery document.

Install
caplets install spiritledsoftware/caplets google-docs

Inspect before installing

  • Can change external servicesThis Caplet may perform mutating operations against an external service.
  • Authentication requiredThis Caplet needs credentials or an auth flow before use.
CAPLET.md

Frontmatter

FieldValue
nameGoogle Docs
descriptionRead, create, and edit Google Docs documents through the Google Docs API Discovery document.
tagsgoogle, docs, documents, productivity
catalog.iconhttps://www.gstatic.com/images/branding/product/2x/docs_2020q4_48dp.png
googleDiscoveryApi.discoveryUrlhttps://docs.googleapis.com/$discovery/rest?version=v1
googleDiscoveryApi.includeOperationsdocs.documents.get, docs.documents.create, docs.documents.batchUpdate
googleDiscoveryApi.auth.typeoauth2
googleDiscoveryApi.auth.issuerhttps://accounts.google.com
googleDiscoveryApi.auth.clientId$vault:GOOGLE_CLIENT_ID
googleDiscoveryApi.auth.clientSecret$vault:GOOGLE_CLIENT_SECRET
googleDiscoveryApi.auth.scopeshttps://www.googleapis.com/auth/documents

Google Docs

Use this Caplet when an agent needs to inspect document structure, create a new Google Doc, or apply explicit content and formatting updates to a known document.

First Workflow

  1. Start from a document ID, document URL, or newly created document returned by documents.create.
  2. Use documents.get to inspect the current document structure before proposing edits.
  3. Group content and formatting changes into one documents.batchUpdate request when possible.
  4. Confirm the target document ID and intended changes before creating or updating documents.

Operate Carefully

  • Google Docs content can contain private, shared, or regulated information. Read only the document sections needed for the task.
  • documents.batchUpdate can change real document content and formatting. Prefer a planned set of requests over exploratory writes.
  • Use Google Drive for file search, folder placement, sharing, copying, moving, trashing, or deleting documents.