recipe-create-doc-from-template

Copies a Google Docs template, fills in content, and shares it with collaborators.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill recipe-create-doc-from-template-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: recipe-create-doc-from-template
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/recipe-create-doc-from-template
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill recipe-create-doc-from-template-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Creating recurring documents like project briefs from scratch wastes time and leads to inconsistent formatting. This Skill automates the full workflow of duplicating a Google Docs template, inserting content, and granting access to teammates. ## Core Features & Use Cases - Template Duplication: Copies an existing Google Docs template via the Google Drive API using the gws CLI. - Content Insertion: Writes structured Markdown-style content directly into the newly created document. - Permission Sharing: Grants writer access to specified collaborators by email. - Use Case: A project manager needs a Q2 launch brief. The Skill copies the standard brief template, fills in the objective section, and shares it with the team in one flow. ## Quick Start Create a new Google Doc from my project brief template, add the Q2 launch objective, and share it with [email protected].

Frequently Asked Questions about recipe-create-doc-from-template

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Google Doc from a template using the command line?

Use the gws CLI to copy the template file with gws drive files copy, passing the template file ID and a new document name. Then write content into the new document with gws docs +write using the returned document ID.

How do I share a Google Doc with collaborators via API?

Run gws drive permissions create with the file ID and a JSON body specifying the role, type, and email address. Setting role to writer grants edit access to the specified user.

What tools are required to run this Google Docs template recipe?

The gws command-line binary must be installed, and the gws-drive and gws-docs skills must be loaded beforehand. These provide the Drive file operations and Docs content writing capabilities.

Can I use this workflow with any Google Docs template?

Yes, any Google Doc can serve as the template as long as you have its file ID and access permissions. Replace TEMPLATE_DOC_ID in the copy command with your template's ID.

Why does the document copy step fail?

Copy failures typically occur when the template file ID is invalid or the authenticated account lacks read access to the template. Verify the file ID and sharing permissions on the source document.