recipe-draft-email-from-doc
googleworkspace/cli
Read a Google Doc and draft it as a Gmail message body.
What is recipe-draft-email-from-doc?
This recipe combines Google Docs and Gmail to streamline email composition. Read content from a Google Doc, extract the text, and use it as the body of a Gmail draft or sent message.
- Retrieve content from a specified Google Doc
- Extract text from the document body
- Compose a Gmail message using the Doc content as the email body
- Support custom recipient, subject, and message body from Doc source
How to install recipe-draft-email-from-doc
npx skills add null --skill recipe-draft-email-from-doc- gws-docs skill installed
- gws-gmail skill installed
- Google Workspace CLI (gws) configured with authentication
- Access to the Google Doc and Gmail account
How to use recipe-draft-email-from-doc
- 1.Identify the Google Doc ID containing your email content
- 2.Run `gws docs documents get --params '{"documentId": "DOC_ID"}'` to retrieve the document
- 3.Copy the text content from the document body
- 4.Execute `gws gmail +send --to recipient@example.com --subject 'Your Subject' --body 'CONTENT_FROM_DOC'` with the extracted content
Use cases
- Draft newsletters by writing in Google Docs, then sending via Gmail
- Convert meeting notes or reports stored in Docs into email messages
- Reuse templated content from Docs for bulk email composition
- Create email drafts from collaborative documents without manual copying
- Email marketers and communicators
- Project managers sending status updates
- Teams using Google Workspace for document collaboration
- Anyone automating email workflows from shared documents
recipe-draft-email-from-doc FAQ
Yes, currently you retrieve the Doc content and manually insert it into the Gmail send command. Future versions may support direct piping.
The recipe shows single recipient syntax. Check gws-gmail documentation for multiple recipient support.
The recipe extracts plain text from the document body. Complex formatting may not transfer; plain text is recommended.
The recipe uses the send command. Use gws-gmail draft commands if you need to create unsent drafts instead.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: recipe-draft-email-from-doc description: "Read content from a Google Doc and use it as the body of a Gmail message." metadata: version: 0.22.5 openclaw: category: "recipe" domain: "productivity" requires: bins: - gws skills: - gws-docs - gws-gmail
Draft a Gmail Message from a Google Doc
PREREQUISITE: Load the following skills to execute this recipe:
gws-docs,gws-gmail
Read content from a Google Doc and use it as the body of a Gmail message.
Steps
- Get the document content:
gws docs documents get --params '{"documentId": "DOC_ID"}' - Copy the text from the body content
- Send the email:
gws gmail +send --to recipient@example.com --subject 'Newsletter Update' --body 'CONTENT_FROM_DOC'
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.