- AI CODING CLUB
- Posts
- đź§ Automating a Blog with ChatGPT, n8n, Notion & Flask
đź§ Automating a Blog with ChatGPT, n8n, Notion & Flask
Yesterday, I built a custom blog. Not by hand, but by vibe coding it into existence. Here’s how it works—and how you can do the same.

✨ The Vibe: AI Writes, n8n Publishes, Notion Hosts, Flask Displays
I wanted a publishing workflow that felt fun. Fast. Custom.
Fully AI-powered but still editable if needed.
So I built this:
A custom GPT that researches and writes full blog posts
n8n that receives the output and automates everything else
Notion as the CMS
A Flask web app that displays the content beautifully, with search, tags, and pagination
The full pipeline runs in 8–15 seconds.
🛠️ The Stack (No React. No overkill.)
Custom GPT (via ChatGPT) → Generates structured JSON
n8n (self-hosted) → Automates post-processing and API calls
Notion → Stores content in a database
Flask + Vanilla JS/CSS/HTML → Frontend & backend
Stable Diffusion + imgBB → Generates & hosts article images
Railway → Deploys both n8n and the web app
VS Code + Copilot & Cline → AI coding assistants throughout
🔄 The Workflow (In Seconds) Here’s the full loop

Start in ChatGPT → I feed a topic to a custom GPT → It does web research and returns a structured JSON:
5 content sections
SEO meta description
Sources
Image prompt
Tags
Send to n8n → The GPT sends JSON via function-calling to a webhook → n8n:
Parses sections, tags, word count (via JS)
Calls Stable Diffusion API for the image
Uploads it to imgBB to get a hosted URL
Sends everything to Notion

View on Flask blog → My web app (deployed on Railway) fetches content from Notion
→ It includes:
Pagination (10 per page)
Search across all articles
Tags & filters
Beautiful layout and images
Cache busting → When new content is added, I manually trigger a cache reset
All of it runs with a few clicks or keystrokes—and the blog updates instantly.
đź§Ş Why This Setup?
Custom GPTs give me editorial control.
I see the research phase, refine the structure, and only then hit “publish.”
n8n makes it easy to expand. I can reuse the same backend for other projects or blogs—just point it at a different Notion DB.
Notion keeps things human-editable. I can update a headline or source later without touching code.
Flask gives me full freedom over UI and speed.
No CMS login. No React build. No overkill. Just clean, fast, AI-assisted shipping.
đź’ˇ Lessons from Building It
Word counts: don’t trust the GPT—use JS in n8n to calculate
Images: Stable Diffusion returns base64 → needs uploading (imageB handles this)
Custom GPT function-calling = superpower. The OpenAPI spec makes it easy
You don’t need a fancy frontend. Just write HTML + JS with Copilot/Cline, and ship
đź§ Want to Build It Yourself? You can.
Start with:
A custom GPT with a structured JSON output
A webhook in n8n
A Notion DB with the fields you want (sections, tags, image URL…)
A simple Flask app pulling from Notion’s API
If you want to see the actual code, I’m happy to share.
Or build your own flavor.
You could swap Notion for Airtable, use Gemini or Claude as the content engine, or go full static site if you prefer.
The key is: use AI as your team—then let automation take it from there.
🚀 Mini Challenge: Build a Blog in a Day Your turn.
Use a GPT (or Claude) to generate structured blog content.
Then automate its publication to a CMS and display it via Flask or static HTML.
Make it fast. Make it yours. Make it vibe.
If you build something cool, send it my way. I’d love to feature your blog in the next issue.
Keep vibing,
Frédérick