Google Docs Block
Read, write, and create documents
The Google Docs block integrates Google Docs into your workflow so you can read content from existing documents, write content into them, and create brand-new documents. Reach for it when a workflow needs to pull text out of a doc, append generated content, or produce a new document via OAuth-authenticated Google access.
Overview
| Property | Value |
|---|---|
| Type | google_docs |
| Category | tools |
| Color | #E0E0E0 |
When to Use
- Read the text content of an existing Google Doc to feed it into downstream blocks.
- Write or append AI-generated or workflow-produced content into a specific document.
- Create a new document with a title and optional starting content.
- Save a new document into a chosen Google Drive folder (or the root folder).
- Reference a document by picking it from a file selector, or by supplying its ID manually in advanced mode.
Configuration
Operation
Dropdown to choose what the block does: Read Document (read), Write to Document (write), or Create Document (create). Defaults to read.
Google Account
OAuth credential (credential) for the Google account, using the google-docs provider with the drive.file scope. Required.
Select Document / Document ID
For read and write operations, pick the target document with the documentId file selector (basic mode) or enter the ID directly via manualDocumentId (advanced mode).
Document Title
For the create operation, title sets the name of the new document. Required.
Select Parent Folder / Parent Folder ID
For the create operation, choose a destination with the folderSelector file selector (basic mode) or supply folderId manually (advanced mode). Leave empty to create in the root folder.
Content
The content long-input holds the text to write (required for write) or the optional starting content for create.
Inputs & Outputs
- Inputs:
operation(string) — Operation to perform,credential(string) — Google Docs access token,documentId(string) — Document identifier (basic mode),manualDocumentId(string) — Manual document identifier (advanced mode),title(string) — Document title (create only),folderSelector(string) — Selected folder (basic mode, create only),folderId(string) — Folder identifier (advanced mode, create only),content(string) — Document content (write/create) - Outputs:
content(string) — Document content (read operation),metadata(json) — Document metadata including documentId, title, mimeType, and URL,updatedContent(boolean) — Content update status (write operation)
Tools
- Read Google Docs Document (
google_docs_read) — Fetches the full text and metadata of an existing Google Docs document via the Docs API (GET /v1/documents/{documentId}). RequiresdocumentIdand an OAuth access token. - Write to Google Docs Document (
google_docs_write) — Appends text to an existing document using the Docs API batchUpdate endpoint (POST /v1/documents/{documentId}:batchUpdate). Inserts content at the end of the document. RequiresdocumentId,content, and an OAuth access token. - Create Google Docs Document (
google_docs_create) — Creates a new Google Docs document via the Drive API (POST /drive/v3/files) and, ifcontentis provided, immediately writes it usinggoogle_docs_write. Requirestitle; optionally acceptsfolderIdorfolderSelectorto place the document in a specific Drive folder.
YAML Example
google_docs_1:
type: google_docs
name: "Google Docs"
inputs:
operation: "write"
credential: "{{credentials.google_docs}}"
documentId: "1AbCdEfGhIjKlMnOpQrStUvWxYz"
content: "{{start.input}}"
connections:
outgoing:
- target: next-block-id