recipe-share-doc-and-notify

Shares a Google Docs document with edit access and emails collaborators the link.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually locating a Google Doc, adjusting its sharing permissions, and notifying each collaborator involves repetitive steps across multiple Google Workspace tools. This recipe automates the entire sequence so a document is shared with edit access and collaborators receive the link by email in one workflow. ## Core Features & Use Cases - Document Discovery: Finds the target Google Doc by name using the Drive files list API with a mimeType filter. - Permission Granting: Creates a writer permission for a specified collaborator email via the Drive permissions API. - Email Notification: Sends the document link to collaborators through Gmail with a custom subject and body. - Use Case: A project manager finishes a project brief and needs a reviewer to edit it immediately; this recipe locates the brief, grants the reviewer write access, and emails them the link. ## Quick Start Share the Google Doc named Project Brief with [email protected] as an editor and email them the link.

Frequently Asked Questions about recipe-share-doc-and-notify

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

FAQPage Schema
How do I share a Google Doc with edit access from the command line?

Use the gws CLI to call the Drive permissions create endpoint with role set to writer, type set to user, and the collaborator's email address. This recipe combines that call with a file search and a Gmail notification in one workflow.

How to find a Google Doc by name using the Drive API?

Run gws drive files list with a query parameter filtering on the document name and the mimeType application/vnd.google-apps.document. The query returns matching files whose IDs can be used for sharing.

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

The recipe requires the gws command-line tool plus three loaded skills: gws-drive for file search and permissions, gws-docs for document context, and gws-gmail for sending the notification email.

Can I send the shared Google Doc link through Gmail automatically?

Yes, the recipe uses gws gmail +send with the recipient address, a subject line, and a body containing the document URL. The link is constructed from the document ID returned by the Drive search step.

What permission role does this recipe grant to collaborators?

It grants the writer role, which gives the recipient edit access to the document. The permission type is user, tied to the specific email address provided in the permissions create call.