Jae Wilson @DataCrew

Sync Google Drive and Google Docs to your computer and split tabs into Markdown Files

January 15, 2025

Hook

Google Drive's export API has a silent limitation: when you download a Google Doc with multiple tabs, you get one monolithic file — there's no way to request individual tabs separately.

Why It Matters

If your team uses Google Docs tabs to organize related but distinct content (internal vs. customer-facing docs, per-ticket write-ups, multi-section runbooks), that structure is lost the moment you export. Downstream tools like Notion, Confluence, or static site generators expect one-document-per-file. Without a way to split on export, you're either stuck with manual copy-paste or publishing a wall of unstructured text. This library closes that gap by downloading your Drive content programmatically and using BeautifulSoup to parse and emit each tab as its own Markdown file.

What You'll Learn

  • Build a Drive sync script that downloads files and folders from a specified Google Drive path to local disk
  • Use BeautifulSoup to parse exported Google Doc HTML and identify tab boundaries
  • Split a multi-tab document into individual Markdown files, preserving per-tab structure
  • Understand why the Google Docs export API doesn't support tab-level granularity and how to work around it