August 1, 2026
Automating Personal Blogs
8 min read
How I automated my personal blog publishing using Manus AI agent with a custom secured API connector.
Automating Personal Blogs
Hey everyone! Rohit here. As a developer with a portfolio at rohitlodhi.in, I've always enjoyed sharing my thoughts and projects on my blog. However, the process of publishing new content used to be a bit of a chore. That is, until I decided to put my own skills, and the power of AI, to work.
The Problem: Manual Publishing is a Pain
Initially, my blog was built on static Markdown files. While simple and effective for a small number of posts, it quickly became tedious. Every new post meant:
- Manually creating a new Markdown file.
- Ensuring consistent front matter (title, date, tags, summary).
- Running a build process to generate the static site.
- Deploying the updated site.
This manual overhead often deterred me from publishing as frequently as I wanted. I needed a more streamlined, automated approach.
The Solution Architecture: Next.js, Prisma, and a Secured API
To tackle this, I decided to modernize my blog's backend. I migrated from static files to a database-backed system using:
- Next.js: For the frontend and API routes.
- Prisma: As my ORM, connecting to a PostgreSQL database to manage blog posts.
This setup allowed me to create a robust content management system. The crucial part was building secured admin API endpoints at /api/admin/blogs for CRUD (Create, Read, Update, Delete) operations. These endpoints are the gateway for managing my blog content programmatically.
How the Manus Connector Works Its Magic
This is where Manus AI truly shines. I configured a "Custom API" connector within Manus, which I aptly named "Rohit Blog." This connector is essentially a bridge between Manus and my blog's admin API. The most critical aspect here is security: the connector securely stores an encrypted x-api-key header, which acts as a shared secret between Manus and my API.
Now, the workflow is incredibly simple:
- I tell Manus, "Write a blog post about X."
- Manus, leveraging its AI capabilities, researches the topic, drafts the full content, and formats it beautifully in Markdown.
- Once the content is ready, Manus makes a POST request to my
/api/admin/blogsendpoint. - This request includes all the necessary data:
title,content(in Markdown),tags,summary, and any other metadata. - My Next.js backend receives the request, validates the
x-api-key, and then uses Prisma to save the new post to the PostgreSQL database.
And just like that, my blog post goes live on rohitlodhi.in!
Security Considerations: Why API Keys and Not CORS?
Security was paramount. Here's how I approached it:
- API Key Authentication: My admin endpoints are secured with an
x-api-keyheader. This key is a secret known only to Manus and my API. Any request without a valid key is rejected. - Encrypted Storage in Manus: The API key is stored securely (encrypted) within Manus's connector system. This means I don't have to worry about it being exposed.
- No Public Access: The admin endpoints are not publicly accessible. They are designed for server-to-server communication.
- CORS is Not the Answer Here: You might wonder about CORS (Cross-Origin Resource Sharing). While CORS is vital for browser-based security, it doesn't apply to server-to-server calls. For direct server communication, an API key is the appropriate and effective security measure.
This model ensures that only authorized entities (in this case, my Manus AI agent) can publish content to my blog.
The Publishing Workflow in Action
Imagine this:
I want to write about a new web development trend. I simply prompt Manus with the topic. Manus then takes over:
- Research: Gathers information on the trend.
- Drafting: Writes a comprehensive blog post, structuring it with headings, code examples, and clear explanations.
- Formatting: Ensures the content is perfectly formatted in Markdown.
- Publishing: Constructs a JSON payload with the blog post data and sends it via a POST request to my
/api/admin/blogsendpoint, including thex-api-keyheader.
Within moments, a new, well-researched, and perfectly formatted blog post appears on my website. It's truly magical!
What's Next: Future Improvements
This automated publishing system is just the beginning. I'm already thinking about future enhancements:
- Scheduled Publishing: Allowing Manus to schedule posts for a future date.
- Content Updates: Enabling Manus to update existing posts, perhaps to correct errors or add new information.
- SEO Optimization: Integrating AI-driven SEO suggestions before publishing.
- Image Generation: Having Manus generate relevant images or diagrams for blog posts.
This journey with Manus AI has transformed my blogging experience, making it more efficient and enjoyable. I'm excited to see how much further I can push the boundaries of AI-powered content creation and management!