---
id: ssh-gws-docs-write
name: "gws-docs-write"
url: https://skills.yangsir.net/skill/ssh-gws-docs-write
author: googleworkspace
domain: ai-productivity-automation
tags: ["google-docs-api", "document-automation", "google-workspace", "collaborative-editing"]
install_count: 25000
rating: 4.60 (314 reviews)
github: https://github.com/googleworkspace/cli
---

# gws-docs-write

> 用于将文本内容追加到Google Docs文档中，实现文档内容的自动化更新。

**Stats**: 25,000 installs · 4.6/5 (314 reviews)

## Before / After 对比

### Google Docs：向文档追加文本

## Readme

# docs +write

> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.

Append text to a document

## Usage

```bash
gws docs +write --document <ID> --text <TEXT>
```

## Flags

| Flag | Required | Default | Description |
|------|----------|---------|-------------|
| `--document` | ✓ | — | Document ID |
| `--text` | ✓ | — | Text to append (plain text) |

## Examples

```bash
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](../gws-shared/SKILL.md) — Global flags and auth
- [gws-docs](../gws-docs/SKILL.md) — All read and write google docs commands


---
*Source: https://skills.yangsir.net/skill/ssh-gws-docs-write*
*Markdown mirror: https://skills.yangsir.net/api/skill/ssh-gws-docs-write/markdown*