DevNotion
DevNotion is an agentic server built using 3 mastra agents to work as a pipeline to publish weekly blogs on Notion Pages & DEV.to
Install / Use
/learn @yashksaini-coder/DevNotionQuality Score
Category
Development & EngineeringSupported Platforms
README
DevNotion
A 3-agent Mastra pipeline that transforms your weekly GitHub contributions into blog posts on Notion and DEV.to — fully automated via CI. Built for the DEV.to x Notion MCP Challenge.
<img src="./assets/Architecture.png" alt="DevNotion Architecture" />What It Does
Every Sunday (or on-demand via CI), DevNotion:
- Harvests your GitHub activity via GraphQL — commits, PRs, issues, reviews, discussions, language stats, and contribution streak
- Narrates the data into a first-person blog post using Gemini — casual, playful, written as the developer
- Publishes to two platforms:
- Notion — planner-style page with stats tables, repo breakdowns, PR/issue/review tables, and the full blog post
- DEV.to — draft article with canonical URL pointing back to Notion
Architecture
| Step | Agent | LLM? | What it does |
|------|-------|------|--------------|
| Harvest | github-harvest-agent | No | Fetches weekly GitHub data via GraphQL (deterministic) |
| Narrate | narrator-agent | Yes (Gemini) | Writes a first-person blog post from the data |
| Publish | publisher-agent | No | Creates Notion page + DEV.to draft via direct APIs |
The pipeline only uses an LLM where it adds value (narration). Harvest and publish are deterministic — no token overhead, no hallucination risk.
MCP Integration
The publisher agent integrates with the Notion MCP Server (@notionhq/notion-mcp-server) via @mastra/mcp, giving it the full Notion API surface in the Mastra playground. The automated workflow uses direct API calls for reliability, with the Notion Markdown Content API for rich page content.
Narration Fallback Chain
- Gemini generation — YAML frontmatter + markdown blog post
- Deterministic fallback — builds a basic post from raw data (zero LLM dependency)
A blog post is always generated, even if the LLM is unavailable.
Quick Start
Prerequisites
- Node.js 22+
- pnpm
- GitHub personal access token (
ghp_) - Google AI Studio API key(s) (get here)
- Notion integration token + parent page ID (setup guide)
- DEV.to API key (optional — Settings → Extensions → API Keys)
CI (GitHub Actions)
The workflow runs automatically every Sunday at 08:00 UTC. You can also trigger it manually:
Actions → Weekly Blog Dispatch → Run workflow (optionally provide a YYYY-MM-DD week start)
Required secrets: GH_TOKEN, GH_USERNAME, GOOGLE_API_KEYS, NOTION_TOKEN, NOTION_PARENT_PAGE_ID, DEVTO_API_KEY
Blog Tone Profiles
Set BLOG_TONE in your .env.local (default: casual):
| Tone | Style |
|------|-------|
| casual | First-person, playful, OSS-passionate dev energy |
| professional | Confident builder, clear and direct |
| technical | Deep-dive, architecture-focused, conversational |
| storytelling | Personal dev diary, honest and engaging |
Notion Page Format
Each week creates a planner-style Notion page with:
- Published Links — Notion page + DEV.to draft edit link
- Week at a Glance — stats table (commits, PRs, issues, reviews, lines changed)
- Active Repositories — repo table with commits, language, changes
- Pull Requests / Issues / Reviews / Discussions — structured tables
- Languages — top languages by commit count
- Blog Post — the full narrated content
Blog Log
| Week | Headline | Repos | Commits | PRs | Issues | Reviews | Lines Changed | Languages | Notion | DEV.to | |------|----------|-------|---------|-----|--------|---------|---------------|-----------|--------|--------| | 2026-03-23 | Week of 2026-03-23: 134 commits across 7 repos | 7 | 134 | 2 | 3 | 3 | +227/-80 | Python, TypeScript, Rust | View | Draft | | 2026-03-08 | Scaling p2p Concurrency and a 59-Commit Sprint ... | 10 | 119 | 2 | 2 | 1 | +521/-84 | Python, TypeScript, Rust | View | Draft | | 2026-03-01 | Simulating P2P Attacks and Teaching AI to Resum... | 9 | 78 | 4 | 0 | 1 | +21,632/-6,597 | Python, TypeScript, Rust | View | Draft |
Tech Stack
- Mastra — Agent framework with workflows, tools, and MCP support
- Gemini — LLM provider (key rotation for rate limits)
- Notion API — Page creation + Markdown Content API
- Notion MCP Server — Model Context Protocol integration
- DEV.to API — Draft article publishing
- GitHub Actions — Weekly cron + manual dispatch CI
