Mnemos β Notion Integration
Bridge your Notion workspace with Mnemos for Git-based knowledge management with full version history and offline access.
Architecture
Notion Workspace
β (export via API/manual)
~/notion-backup/ (Git repo)
βββ databases/
β βββ projects/
β βββ notes/
β βββ tasks/
βββ pages/
β βββ individual-pages/
βββ assets/
βββ images/
β (symlink integration)
mnemos/p/notion/
βββ projects/ β ~/notion-backup/databases/projects/
βββ notes/ β ~/notion-backup/databases/notes/
βββ pages/ β ~/notion-backup/pages/
Quick Setup
1. Get Notion API Token (Optional but Recommended)
- Go to Notion Integrations
- Create a new integration
- Copy the βInternal Integration Tokenβ
- Share your databases/pages with this integration
2. Set Up Sync
# Set your Notion token (optional)
export NOTION_TOKEN="secret_xxxxxxxxxxxx"
# Run initial setup
make notion-setup
# Sync your Notion content
make notion-sync
3. Manual Export (Fallback)
If API export doesnβt work:
- Go to Notion β Settings & Members β Export content
- Choose βMarkdown & CSVβ format
- Download and extract to
~/notion-backup/ - Run
make notion-syncto integrate with Mnemos
Usage
Regular Sync
# Sync Notion β Git β Mnemos
make notion-sync
# Format and update Mnemos metadata
make fmt
# Push everything to Git
make push
Access in Mnemos
Your Notion content will be available in:
p/notion/projects/- Project databasesp/notion/notes/- Note databasesp/notion/pages/- Individual pages
Git History
All changes are tracked in the ~/notion-backup/ Git repository:
cd ~/notion-backup
git log --oneline # View sync history
git diff HEAD~1 # See latest changes
Advanced Configuration
Custom Sync Location
# Use custom backup location
./scripts/notion-to-git.sh /path/to/custom/notion-backup
Automated Sync
Add to crontab for automatic daily sync:
# Sync Notion daily at 9 AM
0 9 * * * cd /path/to/mnemos && make notion-sync >/dev/null 2>&1
Docker Export Setup
For API-based export, ensure Docker is available:
# Pull the export tool
docker pull looorent/notion-exporter
Benefits
β Git Version Control
- Full history of all Notion changes
- Diff changes between syncs
- Backup and restore capabilities
β Offline Access
- Work with your Notion content offline
- No API rate limits for reading
- Fast local search and processing
β Mnemos Integration
- Use Notion content in Mnemos workflows
- Apply Mnemos formatting and metadata
- Cross-reference with other knowledge sources
β Format Flexibility
- Notion content as standard Markdown
- Portable between tools
- Easy to process with scripts
Troubleshooting
Export Issues
If automatic export fails:
- Check your Notion token is valid
- Ensure integration has access to pages/databases
- Try manual export as fallback
Permission Errors
# Fix permissions if needed
chmod +x scripts/notion-to-git.sh
Missing Dependencies
# Install required tools
brew install git # macOS
apt install git # Ubuntu/Debian
File Structure
Your ~/notion-backup/ will contain:
notion-backup/
βββ .git/ # Git history
βββ README.md # Backup info
βββ databases/ # Notion databases
β βββ projects/
β β βββ project-a.md
β β βββ project-b.md
β βββ notes/
β β βββ idea-1.md
β β βββ research-notes.md
β βββ tasks/
β βββ todo-items.md
βββ pages/ # Individual pages
β βββ meeting-notes/
β βββ reference-docs/
βββ assets/ # Images and files
βββ image-1.png
βββ document.pdf
Next Steps
After setting up Notion sync:
- Review Content: Check
~/notion-backup/for exported content - Format Notes: Run
make fmtto add Mnemos metadata - Explore Integration: Browse
p/notion/in your Mnemos vault - Set Up Automation: Add to crontab for regular syncing
- Backup: Consider pushing
~/notion-backup/to a Git remote
This integration gives you the best of both worlds: Notionβs collaborative editing with Gitβs version control and Mnemosβs structured knowledge management.