跳到主要内容
哒哒星球DADA PLANET

Skill · 已公开版本

gws-docs-write · Google Docs 文档追加纯文本

通过 gws 命令行向指定 Google Docs 文档正文末尾追加纯文本内容,属于写操作,执行前需与用户确认。

先看看示例

作者提供的示例,实际效果取决于你的输入和使用工具。

输入

向文档 DOC_ID 末尾追加一行:本周例会改到周四下午三点,请提前准备进度材料。

输出

预期交付:文档正文末尾被追加指定文本,命令返回执行结果(编辑说明,非实际运行结果)

方法说明

---
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.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