AI-labs
About Us

đź”§ Project Overview

This n8n automation helps you turn content ideas from Notion into fully formatted .mdx blog posts with zero manual coding. It uses OpenAI (via Sora AI) to generate blog content, auto-generates a slug based on the title, and creates a file with the blog content in your codebase—all from a Notion status update.

📌 Workflow Steps Overview

  1. Create a new card in Notion with the blog idea and description.
  2. Set the status to "Ready to be generated by AI".
  3. The workflow:
    • Sends the description to Sora AI to generate a long-form .mdx blog post.
    • Generates a URL-friendly slug from the title.
    • Creates a .mdx file named after the slug and writes the generated content into it.
    • Updates the Notion card with the slug and sets the status to "Generated by AI".

That’s it—you now have a fully formatted, ready-to-publish blog post in your codebase!

đź“‚ Tools & Services Used

Notion – for content planning and status tracking.
n8n – to orchestrate the automation.

Sora AI / OpenAI – for blog content generation.

File system / GitHub repo – to save the .mdx files (via local write or GitHub API).

🛠️ Detailed Workflow Breakdown

1. Content Draft in Notion

Create a Notion database item.

Fill in:

- **Title**: This will be used to generate the slug and the H1 title of the blog.
- **Description**: Short brief or bullet points for AI to expand into a blog.
- **Status**: Start with `Idea`.

2. Triggering AI Blog Generation

Change Status to Ready to be generated by AI.

n8n Actions:

  1. Reads the Title and Description.
  2. Sends the Description to Sora AI to generate:
    • A full-length markdown blog post (with frontmatter, H1, and formatting).
    • Format is .mdx ready (supporting JSX or components if needed).
  3. Generates a slug from the title (e.g., "5 AI Trends in 2025" → 5-ai-trends-in-2025).
  4. Creates a new .mdx file with that slug as the filename (e.g., 5-ai-trends-in-2025.mdx).
  5. Inserts the AI-generated content into that file.
  6. Updates Notion:
    • Adds the slug field.
    • Changes status to Generated by AI.

3. Directory Structure (Optional Convention)

/blog
  ├── 5-ai-trends-in-2025.mdx
  ├── how-to-use-n8n-with-notion.mdx

4. MDX Template Structure

Here’s what the generated .mdx file looks like:

---
title: "5 AI Trends in 2025"
date: "2025-05-20"
slug: "5-ai-trends-in-2025"
summary: "Explore the top 5 trends in AI that are reshaping the tech world."
---

# 5 AI Trends in 2025

The future of AI is both exciting and disruptive...

// Continue with generated content