Skip to main content

Google Docs Reader

The Google Docs Reader node retrieves content and metadata from one or multiple Google Docs documents. It supports reading from specific tabs within documents and offers multiple output formats including JSON, plain text, and Markdown.

Prerequisites

  • A Google account with access to Google Docs
  • Google Docs integration configured in DNG Builder
  • Read access to the documents you want to retrieve

Parameters

Integration

integration_id
string
required
The Google Docs integration to use for authentication. Select your connected Google account from the dropdown.

Document Selection

document_ids
array
required
List of Google Docs document IDs to read. Use the document picker to browse and select documents from your Google Drive. You can select multiple documents to read in a single operation.
document_names
array
Names of the selected Google Docs. This field is automatically populated when you select documents using the picker.

Output Configuration

output_type
select
required
Choose the format for the output data:
  • json - Extracts the content as a structured JSON object
  • plain_text - Extracts the content as a plain text string
  • markdown - Extracts the content as a Markdown string (default)

Tab Selection

read_all_tabs
boolean
Read content from all tabs in each document. Default: true
selected_tabs
string
Map of document IDs to their selected tab metadata. When read_all_tabs is false, this specifies which tabs to read from each document. Configure this using the “Configure tabs” button in the document settings.

Response

document_data
string
JSON containing document content and metadata. The structure varies based on the selected output type.

JSON Output Example

{
  "documentId": "1abc123...",
  "title": "My Document",
  "tabs": [
    {
      "tabId": "t.0",
      "title": "Tab 1",
      "content": {
        "body": {
          "content": [...]
        }
      }
    }
  ]
}

Plain Text Output Example

My Document

This is the content of the document...

Markdown Output Example

# My Document

This is the content of the document with **formatting** preserved.

## Section Header

- List item 1
- List item 2

Node Functionality

The Google Docs Reader node:
  • Reads content from single or multiple Google Docs documents
  • Supports per-document tab selection for granular control
  • Outputs data in JSON, plain text, or Markdown format
  • Preserves document structure and formatting
  • Uses the Google Docs API v1 documents.get endpoint

Example Usage

Reading Multiple Documents

  1. Add the Google Docs Reader node to your workflow
  2. Select your Google integration
  3. Click “Add Document” and use the picker to select documents
  4. For each document, optionally configure which tabs to read
  5. Choose your preferred output format
  6. Connect the output to downstream nodes for processing

Processing Document Content

A common use case is to read document content and then:
  • Extract specific sections using JSON Path Extractor
  • Transform content using an LLM node
  • Export to another format or platform

Notes

  • Document IDs can be found in the Google Docs URL: https://docs.google.com/document/d/{DOCUMENT_ID}/edit
  • When reading multiple documents, the output contains an array of document data
  • Tab selection allows you to read only specific sections of multi-tab documents
  • The node requires read permissions for all selected documents

Version History

VersionChanges
1.1Simplified parameters: removed document_id and read_multiple. Now uses document_ids array for single or multiple documents.
1.0Initial release. Retrieves document content and metadata using documents.get API.