recipe-draft-email-from-doc

Reads Google Doc content and sends it as a Gmail message body.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually copying content from a Google Doc into an email is repetitive and error-prone, especially for recurring communications like newsletters or status updates. This recipe automates the transfer of document content directly into a Gmail message. ## Core Features & Use Cases - Document Retrieval: Fetches the full content of a Google Doc using the gws CLI and the Google Docs API. - Email Composition: Sends the retrieved document text as the body of a Gmail message with a specified recipient and subject. - Use Case: A team lead maintains a weekly newsletter draft in a shared Google Doc. Once finalized, they use this recipe to pull the doc content and send it to the distribution list without copy-pasting. ## Quick Start Read the content of my Google Doc with ID DOC_ID and send it as an email to [email protected] with the subject Newsletter Update.

Frequently Asked Questions about recipe-draft-email-from-doc

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

FAQPage Schema
How do I send Google Doc content as a Gmail message?

Fetch the document content with gws docs documents get using the document ID, then pass the extracted text to gws gmail +send with the recipient, subject, and body parameters. This recipe chains both commands into one workflow.

How to automate sending a newsletter from a Google Doc?

Keep the newsletter draft in a Google Doc, then run this recipe to retrieve the document body via the Docs API and send it through Gmail with your chosen subject line. No manual copy-pasting is required.

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

The recipe requires the gws command-line binary to be installed, plus two prerequisite skills: gws-docs for document retrieval and gws-gmail for message sending. Both skills must be loaded before execution.

Does this recipe preserve Google Doc formatting in the email?

The recipe copies the text from the document body content into the email body. Rich formatting such as embedded images or complex layouts may not transfer, since the content is passed as a plain body string to the Gmail send command.

Why does the document retrieval step fail with a document ID error?

Retrieval fails when the document ID is invalid, the document does not exist, or the authenticated account lacks access permission. Verify the DOC_ID value and confirm the Google account used by gws has read access to the document.