Recipe Create Doc From Template

作者 googleworkspacea3768d0e82ad无许可证31K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Copy a Google Docs template, fill in content, and share with collaborators.

仅含说明Documents & Office
AI 生成的概览

复制 Google 文档模板、填入内容,并与协作者共享新文档。

功能
该配方使用 gws 命令行工具,演示如何基于现有模板创建 Google 文档。它复制模板文件、获取新文档 ID、向文档写入内容,并授予协作者编辑权限。最终产出一份已填写并已共享的 Google 文档。
适用场景
当你需要基于标准 Google 文档模板生成新文档并随后与团队或协作者共享时使用。适用于项目简报、发布计划等可重复的文档创建场景。
运行要求
需要 gws 命令行工具以及 gws-drive 和 gws-docs 技能。需要访问 Google Drive 和 Google Docs,包括模板文档 ID 和协作者邮箱地址。不附带脚本,仅为操作说明。

Create a Google Doc from a Template

PREREQUISITE: Load the following skills to execute this recipe: gws-drive, gws-docs

Copy a Google Docs template, fill in content, and share with collaborators.

Steps

  1. Copy the template: gws drive files copy --params '{"fileId": "TEMPLATE_DOC_ID"}' --json '{"name": "Project Brief - Q2 Launch"}'
  2. Get the new doc ID from the response
  3. Add content: `gws docs +write --document-id NEW_DOC_ID --text '## Project: Q2 Launch

Objective

Launch the new feature by end of Q2.'4. Share with team:gws drive permissions create --params '{"fileId": "NEW_DOC_ID"}' --json '{"role": "writer", "type": "user", "emailAddress": "[email protected]"}'`

来源与署名

来源:googleworkspace/cli位于skills/recipe-create-doc-from-template提交a3768d0

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架