recipe-email-drive-link

Shares a Google Drive file and emails the link to recipients via gws CLI.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually sharing a Google Drive file, setting permissions, and composing an email with the link involves switching between multiple tools. This recipe automates the entire sequence using the gws command-line interface. ## Core Features & Use Cases - File Lookup: Finds a Google Drive file by name using the Drive files list API. - Permission Granting: Creates reader permissions on the file for a specific recipient email address. - Email Delivery: Sends an email via Gmail containing the shareable document link. - Use Case: You need to send the latest Quarterly Report to a client. The recipe locates the file in Drive, grants the client read access, and emails them the document link in one workflow. ## Quick Start Find the Quarterly Report in my Google Drive, share it with [email protected] as a reader, and email them the link with a short message.

Frequently Asked Questions about recipe-email-drive-link

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

FAQPage Schema
How do I share a Google Drive file and email the link from the command line?

Use the gws CLI to find the file with drive files list, grant access with drive permissions create specifying the recipient email and reader role, then send the link with gws gmail +send including the document URL in the body.

How do I find a Google Drive file ID by name?

Run gws drive files list with a query parameter such as name = 'Quarterly Report'. The response returns matching files with their IDs, which you then use in permission and sharing commands.

What permissions can I grant when sharing a Google Drive file?

The drive permissions create command accepts a role such as reader, along with a type like user and the recipient's emailAddress. This recipe grants reader access, giving recipients view-only permission to the file.

What dependencies are required to run this Drive sharing recipe?

You need the gws binary installed plus the gws-drive and gws-gmail skills loaded. Without these prerequisites, the Drive API and Gmail commands in the recipe cannot execute.

Why does the Drive file search return no results?

The query uses exact name matching, so the file name must match precisely including capitalization and spacing. Verify the file exists in the authenticated Drive account and adjust the query string accordingly.