AI/ML

recipe-save-email-to-doc

googleworkspace/cli · updated Apr 8, 2026

$npx skills add https://github.com/googleworkspace/cli --skill recipe-save-email-to-doc
summary

Save Gmail messages to Google Docs for archival and reference.

  • Requires gws-gmail and gws-docs skills to be loaded
  • Workflow: search Gmail by query, retrieve message content, create a new Google Doc, and append the email body as formatted text
  • Supports filtering by subject, sender, and other Gmail query parameters for targeted message selection
skill.md

1c:["$","div",null,{"className":"prose prose-invert max-w-none prose-headings:font-semibold prose-headings:tracking-tight prose-h1:text-4xl prose-h1:mb-2 prose-h2:text-2xl prose-h2:mb-2 prose-h3:text-lg prose-h3:mb-2 prose-p:text-muted-foreground prose-li:text-muted-foreground prose-code:bg-muted prose-code:text-foreground prose-code:px-1 prose-code:py-0.5 prose-code:rounded-sm prose-code:text-sm prose-code:before:content-none prose-code:after:content-none prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-pre:border-border prose-pre:rounded-md [&_table]:!border-[color:var(--border)] [&_th]:!border-[color:var(--border)] [&_td]:!border-[color:var(--border)]","dangerouslySetInnerHTML":{"__html":"<p><strong>Save Gmail messages to Google Docs for archival and reference.</strong></p>\n<ul>\n<li>Requires <code>gws-gmail</code> and <code>gws-docs</code> skills to be loaded</li>\n<li>Workflow: search Gmail by query, retrieve message content, create a new Google Doc, and append the email body as formatted text</li>\n<li>Supports filtering by subject, sender, and other Gmail query parameters for targeted message selection</li>\n</ul>"}}] 22:T405,<h1>Save a Gmail Message to Google Docs</h1>

<blockquote> <p><strong>PREREQUISITE:</strong> Load the following skills to execute this recipe: <code>gws-gmail</code>, <code>gws-docs</code></p> </blockquote> <p>Save a Gmail message body into a Google Doc for archival or reference.</p> <h2>Steps</h2> <ol> <li>Find the message: <code>gws gmail users messages list --params '{"userId": "me", "q": "subject:important from:boss@company.com"}' --format table</code></li> <li>Get message content: <code>gws gmail users messages get --params '{"userId": "me", "id": "MSG_ID"}'</code></li> <li>Create a doc with the content: <code>gws docs documents create --json '{"title": "Saved Email - Important Update"}'</code></li> <li>Write the email body: `gws docs +write --document-id DOC_ID --text 'From: <a href="https://github.com/googleworkspace/cli/blob/HEAD/skills/recipe-save-email-to-doc/mailto:boss@company.com" target="_blank" rel="ugc nofollow noopener">boss@company.com</a> Subject: Important Update</li> </ol> <p>[EMAIL BODY]'`</p>1d:["$","div",null,{"className":"prose prose-invert max-w-none prose-headings:font-semibold prose-headings:tracking-tight prose-h1:text-4xl prose-h1:mb-2 prose-h2:text-2xl prose-h2:mb-2 prose-h3:text-lg prose-h3:mb-2 prose-p:text-muted-foreground prose-li:text-muted-foreground prose-code:bg-muted prose-code:text-foreground prose-code:px-1 prose-code:py-0.5 prose-code:rounded-sm prose-code:text-sm prose-code:before:content-none prose-code:after:content-none prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-pre:border-border prose-pre:rounded-md [&_table]:!border-[color:var(--border)] [&_th]:!border-[color:var(--border)] [&_td]:!border-[color:var(--border)]","dangerouslySetInnerHTML":{"__html":"$22"}}] 18:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] 16:null