Skip to content

timkimber/notion-transcript2md

Repository files navigation

Notion Meeting Transcript Exporter

export_meeting_transcripts.py connects to the Notion MCP server and exports meeting notes (summary + transcript) as markdown files. It skips meetings that have already been downloaded and tracks exports in a local manifest.

What it does

  • Queries Notion meeting notes via MCP (Streamable HTTP).
  • Fetches each meeting page with transcripts included.
  • Writes markdown files named YYYY-MM-DD Title Case.md.
  • Skips already exported files using ./meeting_transcripts/.manifest.json.

Prerequisites

Before running the script, ensure you have:

  1. Notion Account: You need a Notion account with access to meeting notes
  2. MCP Access: Your Notion workspace must have access to the Meeting Capture Protocol (MCP)
  3. Browser for OAuth: The script uses OAuth authentication which requires a web browser for the initial authorization flow

Install

This repo uses pyproject.toml. The simplest setup is with uv:

uv sync

Or with pip:

pip install -e .

Authentication

By default, the script uses OAuth with Dynamic Client Registration. It will:

  • Register an OAuth client automatically on first run
  • Cache tokens in ~/.notion-mcp-token.json
  • Refresh tokens when they expire

To use an environment variable token instead, see --no-oauth or --env-token below.

Script arguments

  • --output-dir: Directory for markdown output. Default: ./meeting_transcripts.
  • --since: Start date (YYYY-MM-DD). Defaults to last exported date + 1 day, or 365 days ago.
  • --until: End date (YYYY-MM-DD). Defaults to today.
  • --window-days: Query window size in days. Default: 7.
  • --limit: Max number of meetings to export (0 = no limit).
  • --dry-run: Print what would be exported without writing files.
  • --debug: Print timestamped debug logs.
  • --token-cache: Path to cache OAuth tokens. Default: ~/.notion-mcp-token.json.
  • --oauth-redirect-uri: OAuth redirect URI used for manual code paste.
  • --server-url: MCP server URL. Default: https://mcp.notion.com/mcp.
  • --no-oauth: Disable OAuth and use environment variable token instead.
  • --env-token: Use environment variable token (NOTION_MCP_TOKEN by default) instead of OAuth.
  • --token-env: Environment variable name for MCP token (requires --no-oauth or --env-token).

Examples

Basic run (OAuth, default):

python export_meeting_transcripts.py

Backfill a date range:

python export_meeting_transcripts.py --since 2025-10-01 --until 2026-02-19

Dry run (no files written):

python export_meeting_transcripts.py --dry-run

Use environment variable token instead of OAuth:

set NOTION_MCP_TOKEN=your_token_here
python export_meeting_transcripts.py --env-token

Use a custom environment variable:

set MY_NOTION_TOKEN=your_token_here
python export_meeting_transcripts.py --no-oauth --token-env MY_NOTION_TOKEN

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages