gws-docs-write
googleworkspace/cli
Append plain text to the end of a Google Docs document.
What is gws-docs-write?
This skill appends plain text to the end of a Google Docs document using the Google Workspace CLI. Use it when you need to add content to an existing document programmatically.
- Appends text to the end of a document body
- Accepts plain text input via command-line flag
- Requires document ID and text content as parameters
- Integrates with Google Workspace authentication and global flags
How to install gws-docs-write
npx skills add null --skill gws-docs-write- Google Workspace CLI (gws) installed
- gws-shared skill configured for authentication
- Valid Google Docs document ID with write permissions
How to use gws-docs-write
- 1.Obtain the Google Docs document ID from the document URL or metadata
- 2.Prepare the plain text content you want to append
- 3.Run: gws docs +write --document <DOC_ID> --text '<TEXT>'
- 4.Confirm the operation when prompted (write command requires user confirmation)
Use cases
- Adding log entries or notes to a shared document
- Appending user-submitted content to a form response document
- Building automated workflows that update documents with new information
- Logging agent actions or results to a Google Docs audit trail
- Developers automating Google Docs workflows
- Teams using Google Workspace for document management
- Agents that need to persistently record information
gws-docs-write FAQ
No, this skill only supports plain text. For rich formatting (bold, italics, links, etc.), use the raw batchUpdate API instead.
Text is always appended at the end of the document body.
Yes, you need write access to the target Google Docs document and valid Google Workspace authentication configured via gws-shared.
The command will fail with an authentication or document not found error from the Google Docs API.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: gws-docs-write description: "Google Docs: Append text to a document." metadata: version: 0.22.5 openclaw: category: "productivity" requires: bins: - gws cliHelp: "gws docs +write --help"
docs +write
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Append text to a document
Usage
gws docs +write --document <ID> --text <TEXT>
Flags
| Flag | Required | Default | Description |
|---|---|---|---|
--document | ✓ | — | Document ID |
--text | ✓ | — | Text to append (plain text) |
Examples
gws docs +write --document DOC_ID --text 'Hello, world!'
Tips
- Text is inserted at the end of the document body.
- For rich formatting, use the raw batchUpdate API instead.
[!CAUTION] This is a write command — confirm with the user before executing.
See Also
- gws-shared — Global flags and auth
- gws-docs — All read and write google docs commands
Related skills
More from googleworkspace/cli and the wider catalog.
gws-gmail
Send, read, and manage Gmail emails via Google Workspace CLI.
gws-drive
Manage Google Drive files, folders, and shared drives via CLI.
gws-docs
Read and write Google Docs via command line.
gws-calendar
Manage Google Calendar events, calendars, and access control via CLI.
gws-sheets
Read and write Google Sheets spreadsheets via CLI.
gws-gmail-send
Send emails via Gmail with attachments, CC/BCC, HTML support, and draft options.