gdoc-to-obsidian

Convert Google Docs HTML exports into structured Obsidian markdown vaults.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/dsonyy/dotfiles --skill gdoc-to-obsidian-dsonyy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gdoc-to-obsidian
Source: https://github.com/dsonyy/dotfiles/tree/main/skills/gdoc-to-obsidian-converting
Command: npx skills add https://github.com/dsonyy/dotfiles --skill gdoc-to-obsidian-dsonyy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandoc, and includes scripts (resource) components.

What problem does it solve? Google Docs exports bundle HTML and images in a format that does not map cleanly to Obsidian, leaving broken image links, Google redirect URLs, and mangled formatting. This Skill migrates those exports into a clean, faithful Obsidian vault structure. ## Core Features & Use Cases - Deterministic HTML-to-Markdown migration: A Python script preprocesses the Google Docs HTML (rebuilding nested lists, detecting code blocks, mapping CSS classes to bold/italic/color/highlight), runs pandoc, and post-processes the output into clean markdown. - Structured vault output: Splits content into monthly files (YYYY-MM.md), topic files per top-level heading, and an index file, with images copied to a shared assets folder using slug-prefixed Obsidian embeds. - Artifact cleanup: Strips Google redirect wrappers, phantom paragraphs, nbsp entities, and leftover CSS classes while preserving colors, highlights, links, and code fences. - Use Case: You exported a large image-heavy design doc from Google Docs as a zipped web page and want it archived in your Obsidian vault with working images, readable formatting, and topic files grouped by theme. ## Quick Start Ask the assistant to migrate your downloaded Google Docs HTML export into your Obsidian vault by providing the export.html path, a source slug, and the vault root.

Frequently Asked Questions about gdoc-to-obsidian

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

FAQPage Schema
How do I convert a Google Docs export to Obsidian markdown?▼

Download the doc via File → Download → Web Page (.html, zipped), extract it, then run the migrate script with the HTML path, a slug, and your vault root. It produces monthly files, topic files, an index, and slug-prefixed images in the vault's assets folder.

Why can't I export large Google Docs via the Drive API?▼

The Drive API and MCP export cap at 10 MB, so image-heavy documents fail to download programmatically. The browser download of the zipped web page has no size limit and bundles the HTML with an images folder.

Does the migration preserve formatting like colors and highlights?▼

Yes. Font colors become inline span styles, yellow highlights become == marks, colored highlights become background-color spans with forced dark text, and bold, italic, and strikethrough map to standard markdown. Code blocks are fenced as plain text.

What if my Google Doc uses tabs and the export is incomplete?▼

HTML export sometimes captures only the active tab. Verify by counting headings and images against expectations; if tabs are missing, re-export as .docx and convert with pandoc using --extract-media instead.

Is pandoc required for the Google Docs to Obsidian migration?▼

Yes, pandoc performs the HTML-to-GFM conversion. If it is not on your PATH, the script automatically downloads a static pandoc binary to ~/.cache without requiring root access.