HomeBlog

YouTube Transcripts in Notion: No-Code and Python Paths

Notion database of YouTube videos with transcript and summary content stored inside each page

Saving every YouTube transcript to Notion turns a channel you follow into a database you can search, tag, and link from your notes. There are two good ways to build it — a no-code automation or a Python script of about twenty lines — and I'll give you both, because the right one depends entirely on whether you already run n8n or Make.

Path 1: no-code

If an automation tool is already in your life, this is three modules of work. The trigger is the channel's RSS feed (every channel has one: https://www.youtube.com/feeds/videos.xml?channel_id=CHANNEL_ID), the middle is one HTTP call, and the end is a Notion "create page" step pointed at your database.

The HTTP step is the same in every tool:

The response comes back as {"result": {"videoId", "title", "pubDate", "content", ...}} — map result.title to the page title and result.content into the page body. I've written full walkthroughs for n8n, including an LLM summarization node before the Notion step, and for Make with its router setup.

Path 2: twenty lines of Python

No automation platform? The Notion API plus one requests call gets you the same result. Setup first: create an internal integration at notion.so/my-integrations, copy its secret, and share your target database with the integration (databases are invisible to integrations until you do). The database needs a title property called Name.

import requests

YT_KEY = "yt_YOUR_KEY"
NOTION_KEY = "secret_YOUR_NOTION_KEY"
DATABASE_ID = "your-database-id"

def add_video(url):
    r = requests.get(
        "https://youtube2text.org/api/transcribe",
        params={"url": url, "maxChars": 20000},
        headers={"x-api-key": YT_KEY},
    ).json()["result"]
    text = r["content"]
    chunks = [text[i:i + 2000] for i in range(0, len(text), 2000)]
    blocks = [{"object": "block", "type": "paragraph",
               "paragraph": {"rich_text": [{"text": {"content": c}}]}}
              for c in chunks[:100]]
    requests.post(
        "https://api.notion.com/v1/pages",
        headers={"Authorization": f"Bearer {NOTION_KEY}",
                 "Notion-Version": "2022-06-28",
                 "Content-Type": "application/json"},
        json={"parent": {"database_id": DATABASE_ID},
              "properties": {"Name": {"title": [{"text": {"content": r["title"]}}]}},
              "children": blocks},
    )

add_video("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

The url parameter takes any YouTube URL form or a bare 11-character id. For a key without signing up, curl -s https://youtube2text.org/api/demo-key returns a free shared one — 5 videos a month per IP, enough to test.

Why the script chunks the text

That slicing into 2000-character pieces isn't decoration — it's Notion's rule. The API caps each rich text at 2,000 characters and each create-page request at 100 blocks, which is the honest limitation of this whole setup: about 200,000 characters per request, and long transcripts make pages sluggish to open well before that. That's why I set maxChars to 20000. If you genuinely need full multi-hour transcripts stored, append the remaining blocks with follow-up requests to the blocks endpoint — but for most archives, 20k characters plus a summary beats a wall of auto-captions.

Add the summary

The transcript is the raw material; the summary is what you'll actually read in six months. Slot one LLM call between the fetch and the page creation — feed it r["content"], ask for five bullets, and prepend the result as the first paragraph block (in n8n this is just one more node). Once summaries live alongside transcripts, the database also becomes a decent retrieval corpus — that's the starting point for building RAG over a whole channel.

Keys and costs

The shared demo key won't keep up with a channel you actually follow. Sign in with Google at youtube2text.org/app/keys — no phone, no card — for your own key: free 5 videos a month, $5.99 for 50, $9.99 for 500, $19.99 unlimited. The Notion side is free; the transcripts nearly are.