
Google Docs Md
- 6 installs
- 61 repo stars
- Updated August 4, 2026
- joelhooks/joelclaw
Export any Google Doc as clean markdown using the native export?format=md URL parameter, with no auth needed for public docs.
About
Fetches Google Docs as markdown via a URL parameter, more reliably than scraping tools. A developer uses it for doc-to-markdown pipelines like vault ingestion or runbook building.
- Replace the doc URL tail with export?format=md and follow the 307 with curl -L
- Same pattern supports pdf, docx, txt, html, and epub, plus a batch loop
Google Docs Md by the numbers
- 6 all-time installs (skills.sh)
- Ranked #1,691 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/joelhooks/joelclaw --skill google-docs-mdAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 6 |
|---|---|
| repo stars | ★ 61 |
| Last updated | August 4, 2026 |
| Repository | joelhooks/joelclaw ↗ |
What it does
Export any Google Doc as clean markdown using the native export?format=md URL parameter, with no auth needed for public docs.
Files
Google Docs Markdown Export
Google Docs natively supports markdown export via a URL parameter. This is the most reliable way to get markdown from a Google Doc — better than defuddle, jina, or any scraping tool.
URL Pattern
For any Google Doc URL like:
https://docs.google.com/document/d/{DOC_ID}/edit?tab=t.0Replace everything after the document ID with export?format=md:
https://docs.google.com/document/d/{DOC_ID}/export?format=mdExtracting the Document ID
The DOC_ID is the long alphanumeric string between /d/ and the next /:
# From any Google Docs URL, extract the ID:
echo "https://docs.google.com/document/d/1mt8aYM88Jj5qkep1xYC5vj0wBlbX2u6gdxhf_puaiQI/edit?tab=t.0" \
| grep -oP '(?<=/d/)[^/]+'
# → 1mt8aYM88Jj5qkep1xYC5vj0wBlbX2u6gdxhf_puaiQIFetching
# Public docs — no auth needed, follow the 307 redirect:
curl -L "https://docs.google.com/document/d/${DOC_ID}/export?format=md" -o output.md
# Private docs — needs OAuth bearer token:
curl -L "https://docs.google.com/document/d/${DOC_ID}/export?format=md" \
-H "Authorization: Bearer ${TOKEN}" -o output.mdImportant: The endpoint returns a 307 redirect. Always use curl -L (follow redirects) or equivalent.
Other Export Formats
The same pattern works for other formats:
export?format=pdf— PDFexport?format=docx— Wordexport?format=txt— Plain textexport?format=html— HTMLexport?format=epub— ePub
Batch Pattern
When you have a list of Google Doc URLs (e.g. extracted from Front emails):
# Extract doc IDs from a file of URLs
grep -oP '(?<=/d/)[^/]+' urls.txt | sort -u | while read id; do
echo "Fetching $id..."
curl -sL "https://docs.google.com/document/d/${id}/export?format=md" \
-o "docs/${id}.md"
sleep 1 # Be polite
doneWhen to Use
- Always prefer this over defuddle/scraping for Google Docs
- Works for public docs without any authentication
- Native markdown quality is superior to any HTML→markdown conversion
- Handles tables, formatting, links, images (as URLs) correctly
Limitations
- Private docs require a valid OAuth token (use
gogwhen available) - Very large docs may take a few seconds
- Images are referenced as URLs, not embedded
- Comments and suggestions are not included in the export