Skills md-to-gdoc
Convert markdown files to properly formatted Google Docs. Use when asked to create a Google Doc from markdown, upload markdown to Google Docs, put a .md file into Google Docs, or convert research/notes/documents to Google Docs format.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/brennerspear/md-to-gdoc" ~/.claude/skills/clawdbot-skills-md-to-gdoc && rm -rf "$T"
manifest:
skills/brennerspear/md-to-gdoc/SKILL.mdsource content
Markdown to Google Doc
Convert
.md files into Google Docs with proper heading styles, bold, code blocks, lists, links, and blockquotes.
Requirements
- gog — Google Workspace CLI (must be authenticated:
)gog auth add <email> - python3 — used for JSON parsing in the script
Quick Start
scripts/md-to-gdoc.sh <file.md> [--title "Title"] [--parent <folder-id>] [--account <email>]
Resolve
scripts/ relative to this skill's directory.
Critical Rules
- Use
— nevergog docs update --format=markdown
, neverwrite --markdown
. Thecreate --file
path is the only one that correctly applies Google Docs heading styles via the API.update - Markdown must have proper
headings. If the source has "heading-looking" plain text without#
markers, add them before conversion. The script warns but proceeds.# - Two-step process: create empty doc → populate with
. This is deterministic and reliable.update - Always verify heading syntax in the markdown before running. No
= no formatted headings in the output.#
What Works
–#
headings → Google Docs Heading 1–6######
→ bold text**bold**
→ Courier New`inline code`- Fenced code blocks → Courier New + gray background
→ indented paragraphs> blockquotes
→ bullet-prefixed text- bullets
→ number-prefixed text1. numbered
→ hyperlinks[text](url)- Markdown tables → native Google Docs tables
Known Limitations
may not render (gog CLI bug in inline formatting parser — italic detection fails in certain contexts)*italic*- Bullet/numbered lists use text prefixes (
,•
), not native Google Docs list objects1. - Horizontal rules render as 40 dashes
Options
— Doc title. Defaults to filename with hyphens→spaces.--title
— Google Drive folder ID to place the doc in.--parent
— Google account email. Defaults to gog's default (first authenticated account).--account
Troubleshooting
- All body text, no headings: The markdown file lacks
heading markers. Add them.# - gog auth errors: Run
to verify auth. May needgog auth list
.gog auth add <email> - Empty doc created: The
step failed. Check gog output for API errors.update