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 文件,包括範本文件 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 從公開儲存庫中收錄這些內容。

檢舉或申請下架