recipe-create-doc-from-template
googleworkspace/cli
Copy a Google Docs template, fill in content, and share with collaborators.
What is recipe-create-doc-from-template?
This recipe automates creating a new Google Doc from a template, populating it with content, and sharing it with team members. Use it to quickly spin up standardized documents like project briefs, meeting notes, or proposals without manual copying and sharing steps.
- Copy an existing Google Docs template to create a new document
- Populate the new document with custom content via the Docs API
- Share the document with collaborators by setting permissions
- Retrieve document IDs for use in subsequent operations
- Support bulk sharing with multiple team members
How to install recipe-create-doc-from-template
npx skills add null --skill recipe-create-doc-from-template- Google Workspace CLI (gws) installed and authenticated
- gws-drive skill installed and loaded
- gws-docs skill installed and loaded
- Access to a Google Docs template (need the template document ID)
How to use recipe-create-doc-from-template
- 1.Identify the template document ID of the Google Doc you want to copy
- 2.Run the copy command with the template ID and desired new document name
- 3.Extract the new document ID from the response
- 4.Use the gws docs +write command to add or modify content in the new document
- 5.Run the permissions create command to share the document with collaborators, specifying email addresses and roles (viewer, commenter, or writer)
Use cases
- Generate a project brief from a template and share with the launch team
- Create meeting note templates and distribute to attendees before a meeting
- Produce standardized proposal documents and grant access to stakeholders
- Duplicate a design specification template and populate with project-specific details
- Batch-create onboarding documents from a template and share with new hires
- Project managers coordinating team documents
- Content creators using standardized templates
- Administrative staff managing document workflows
- Teams needing consistent document formats across projects
recipe-create-doc-from-template FAQ
Open the Google Doc in your browser. The ID is in the URL: docs.google.com/document/d/DOCUMENT_ID/edit. Copy the long alphanumeric string between /d/ and /edit.
Run the permissions create command once per person, or integrate it into a loop to share with multiple email addresses sequentially.
You can assign 'viewer' (read-only), 'commenter' (can add comments), or 'writer' (can edit) roles.
Yes, use the gws docs API commands to add headings, lists, tables, and other formatted content after the initial copy.
The copy command will fail with an error. Double-check the document ID in the URL and ensure you have access to the template.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: recipe-create-doc-from-template description: "Copy a Google Docs template, fill in content, and share with collaborators." metadata: version: 0.22.5 openclaw: category: "recipe" domain: "productivity" requires: bins: - gws skills: - gws-drive - gws-docs
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
- Copy the template:
gws drive files copy --params '{"fileId": "TEMPLATE_DOC_ID"}' --json '{"name": "Project Brief - Q2 Launch"}' - Get the new doc ID from the response
- 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": "team@company.com"}'`
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.