DEV Community

Abasiodiong Udofia
Abasiodiong Udofia

Posted on

Notion Newsroom AI

Notion MCP Challenge Submission 🧠

This is a submission for the Notion MCP Challenge

What I Built

notion-newsroom — An AI-powered newsroom automation system that enriches breaking news articles with historical context in real-time.

When journalists publish a news article in Notion, the system automatically:

  1. Generates semantic search queries using Gemini LLM to understand the article's core topics
  2. Retrieves relevant historical context from a vector database of past articles, archives, and source materials using ChromaDB
  3. Appends enriched context blocks directy to the Notion page with citations, relevance scores, and source links
  4. Provides explicit feedback via Notion comments, so journalists know what context was found or why it wasn't available

This dramatically accelerates research workflows — journalists no longer need to manually search archives or context databases. The system runs on a schedule and handles mixed data sources (Notion articles, CSV archives, RSS feeds) seamlessly.

Core features:

  • Automated context discovery with configurable relevance thresholds
  • Rich Notion block composition with collapsed toggle blocks for clean UI
  • Explicit error reporting (query generation failures, search unavailable, no relevant matches)
  • Support for heterogeneous archive sources (UUIDs, short numeric IDs)
  • Transactional append safety with built-in chunk size validation

Video Demo

Show us the code

GitHub: udofia2/notion-newsroom

How I Used Notion MCP

Notion MCP is the core integration that makes this workflow possible. Here's how:

1. Reading Published Articles

The MCP server exposes Notion page content as queryable objects. The Context Hunter reads drafts and published articles from a Notion database, extracts content, and pipes it into the semantic search pipeline.

# Read article from Notion via MCP
article_content = notion_client.retrieve_block(page_id)
Enter fullscreen mode Exit fullscreen mode

2. Appending Historical Context Blocks

Once context is found and ranked, MCP enables real-time append of rich text blocks to the Notion page:

  • Composition of nested blocks (toggle → bulleted items → paragraphs with citations)
  • Support for Notion mentions (linking to source pages) and plain text links (for external archives)
  • Automatic chunking to respect Notion's per-element constraints
# Append context block with MCP
context_block = build_historical_context_toggle_block(results, article_title)
notion_client.append_block_children(page_id, [context_block])
Enter fullscreen mode Exit fullscreen mode

3. Posting Automation Feedback

Journalists get explicit comments on articles for all outcomes:

  • ✅ "Historical context added: 8 items"
  • ⚠️ "Query generation failed: provider returned server error 503"
  • 🔍 "Search unavailable: embedding model offline"
  • ❌ "No relevant historical context found"

This visibility is critical — silent automation failures destroy trust. MCP comments bridge the gap.

4. Notion Mentions & Links

The system intelligently handles mixed source IDs:

  • Notion page UUIDs → Rich mentions (mention.page.id)
  • External/Archive sources → Text links with URLs
  • Short numeric IDs → Plain text citations with metadata

Top comments (0)