Skip to content

tanmaydhal/markdown-to-google-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Markdown to Google Docs Converter

A Python script that converts markdown meeting notes into well-formatted Google Docs with proper styling, nested bullets, checkboxes, and mention highlighting. Github Link - https://github.com/tanmaydhal/markdown-to-google-docs

Features

  • ✅ Converts markdown headers to Google Docs heading styles (H1, H2, H3)
  • ✅ Maintains nested bullet point hierarchy with proper indentation
  • ✅ Converts markdown checkboxes - [ ] into actual Google Docs checkboxes
  • ✅ Highlights @mentions with bold blue text
  • ✅ Styles footer information (meeting metadata) in italics
  • ✅ Handles both * and - bullet formats
  • ✅ Preserves document structure and formatting

Setup Instructions

Prerequisites

  • Google account with access to Google Drive
  • Google Colab (recommended) or local Python environment

Required Dependencies

google-auth
google-auth-oauthlib
google-auth-httplib2
google-api-python-client

These are pre-installed in Google Colab. For local use:

pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client

How to Run in Google Colab

Option 1: Direct Upload

  1. Open Google Colab
  2. Upload the markdown_to_gdocs.ipynb notebook
  3. Run all cells in order
  4. When prompted, authenticate with your Google account
  5. The script will create a new Google Doc and output the link

Option 2: From GitHub

  1. Go to Google Colab
  2. Click FileOpen notebookGitHub tab
  3. Enter this repository URL
  4. Select the markdown_to_gdocs.ipynb notebook
  5. Run all cells and authenticate when prompted

Usage

Basic Usage

The notebook includes sample meeting notes. Simply run all cells to convert them to a Google Doc.

Custom Markdown

To convert your own markdown:

  1. Replace the MARKDOWN_NOTES variable with your content:
MARKDOWN_NOTES = """
# Your Title Here

## Section 1
- Bullet point 1
- Bullet point 2
  - Nested bullet

## Action Items
- [ ] @john: Complete task A
- [ ] @sarah: Review document B
"""
  1. Run the script to generate your Google Doc

Markdown Format Support

Headers

# Main Title (H1)
## Section Header (H2)
### Subsection Header (H3)

Bullets

* Standard bullet
  * Nested bullet (2 spaces)
    * Deeper nested bullet (4 spaces)

Checkboxes

- [ ] Unchecked task
- [ ] @username: Task with mention

Mentions

@username will be highlighted in bold blue

Footer

---
Meeting recorded by: Name
Duration: X minutes

(Text after --- is styled in italics)

Project Structure

├── AnsibleHealthFullStackTask.ipynb.ipynb    # Main Colab notebook
├── README.md                   # This file

How It Works

  1. Authentication: Uses Google Colab's built-in authentication
  2. Document Creation: Creates a new Google Doc via the Docs API
  3. Parsing: Processes markdown line-by-line
  4. Formatting: Builds batch API requests for:
    • Text insertion
    • Heading styles
    • Bullet/checkbox creation
    • Text styling (bold, color, italic)
    • Indentation levels
  5. Execution: Sends all formatting requests in a single batch update

Troubleshooting

Authentication Issues

  • Make sure you're signed into Google in your browser
  • Try clearing browser cache and re-authenticating
  • Ensure your Google account has Drive access enabled

Document Not Created

  • Check the console output for error messages
  • Verify your Google account has permission to create docs
  • Ensure you granted all requested permissions during auth

Formatting Issues

  • Verify markdown syntax (proper spacing for nested bullets)
  • Check that indentation uses 2 spaces per level
  • Ensure checkboxes use the format - [ ] exactly

API Limits

The Google Docs API has the following limits:

  • 300 requests per minute per project
  • This script uses batch updates to minimize request count

Contributing

Feel free to open issues or submit pull requests for improvements!

License

MIT License - feel free to use and modify as needed.

Author

Created for converting markdown meeting notes to Google Docs format.

Acknowledgments

  • Google Docs API documentation
  • Google Colab for providing easy authentication

About

Convert markdown meeting notes to formatted Google Docs

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors