Google Docs Writer
The Google Docs Writer node writes content to Google Docs documents. It can create new documents or update existing ones, with support for writing to specific tabs and accepting both plain text and Markdown input.Prerequisites
- A Google account with access to Google Docs
- Google Docs integration configured in DNG Builder
- Write access to the documents you want to update (for existing documents)
Inputs
Content to write to the Google Doc. This can be plain text or Markdown, depending on the input type setting. JSON content will be converted to plain text.
Parameters
Integration
The Google Docs integration to use for authentication. Select your connected Google account from the dropdown.
Document Mode
Create a new document instead of editing an existing one. Default:
falseNew Document Settings
Whencreate_new is true:
Title for the new Google Doc. You can use a static title or the variable
{{documentTitle}} to pass the title dynamically from an upstream node.Existing Document Settings
Whencreate_new is false:
The ID of the Google Docs document to update. Use the document picker to browse and select a document from your Google Drive.
Name of the Google Doc. This field is automatically populated when you select a document using the picker.
ID of the tab to write to. Leave empty to write to the main document body.
Name of the tab to write to. This field is automatically populated when you select a tab.
How to handle existing content:
replace- Replace existing content with new content (default)append- Append new content to the end of existing content
Input Configuration
Choose how to interpret the input content:
plain_text- Content is treated as plain text (default)markdown- Content is parsed as Markdown and converted to Google Docs formatting
Response
JSON containing the document ID, title, and URL of the created or updated document.
Response Example
Node Functionality
The Google Docs Writer node:- Creates new Google Docs documents
- Updates existing documents with replace or append modes
- Writes to specific tabs within a document
- Accepts plain text or Markdown input
- Converts Markdown formatting to native Google Docs styles
- Uses the Google Docs API v1 documents.batchUpdate endpoint
Example Usage
Creating a New Document
- Add the Google Docs Writer node to your workflow
- Select your Google integration
- Enable “Create New Document”
- Enter a document title or check “Use variable for document title” to pass it dynamically
- Choose your input type (plain text or Markdown)
- Connect the content input from an upstream node
Updating an Existing Document
- Add the Google Docs Writer node to your workflow
- Select your Google integration
- Keep “Create New Document” disabled
- Use the picker to select the target document
- Optionally select a specific tab to write to
- Choose write mode: replace or append
- Choose your input type (plain text or Markdown)
- Connect the content input from an upstream node
Writing Markdown Content
When input type is set tomarkdown, the following formatting is preserved:
- Bold and italic text
- Headers (H1-H6)
- Lists (ordered and unordered)
- Links
- Code blocks
Dynamic Document Creation
For workflows that create multiple documents (e.g., in a loop), use the variable option for document title:- Check “Use variable for document title”
- The title field will show
{{documentTitle}} - Pass the document title from an upstream node
Notes
- Document IDs can be found in the Google Docs URL:
https://docs.google.com/document/d/{DOCUMENT_ID}/edit - When replacing content, all existing content in the target location will be removed
- When appending, new content is added after existing content
- The node requires write permissions for existing documents
- New documents are created in the root of your Google Drive
Version History
| Version | Changes |
|---|---|
| 1.0 | Initial release. Write content to new or existing documents. |

