Data Processing & Analysisintermediate
October 16, 2025
6 min read
45 minutes
Automate Blog Writing with AI using n8n
Automate your blog writing with n8n. Chat on Telegram, research with AI, and auto-save polished posts to Google Drive effortlessly.
By Mahedi Hasan Nadvee

Content creation is exhausting. You're juggling research, outlining, drafting, and editing while trying to maintain a consistent publishing schedule. The blank page stares back at you, and you wonder if there's a better way to get from idea to published post without sacrificing quality.
What if you could text a bot on Telegram, brainstorm ideas together, get detailed research on demand, and have your finished blog post automatically saved to Google Drive, all formatted and ready to polish? That's exactly what this n8n workflow delivers. It's like having a writing partner who never sleeps, always has fresh ideas, and handles the heavy lifting of research and drafting.
Prerequisites: What You'll Need
Before building this workflow, make sure you have accounts and API access for the following services:
- OpenAI API: Powers the main AI agent (GPT-4.1) and supporting tasks (GPT-4o-mini)
- Telegram Bot API: Creates your conversational interface
- Perplexity API: Handles deep research with citations
- SerpAPI: Provides web search capabilities
- Google Drive API: Stores and manages your blog documents
- n8n instance: Either cloud or self-hosted
Key Components: The Building Blocks
This workflow uses several specialized n8n nodes working together:
- Telegram Trigger: Captures incoming messages from your bot
- AI Agent: The brain of the operation, using GPT-4.1 with custom instructions
- Window Buffer Memory: Keeps conversation context alive across messages
- Tool Workflow Nodes: Connect to idea generation and research sub-workflows
- Google Drive Tool: Creates and updates documents automatically
- Code Node: Formats output for Telegram's message limits
Step 1: Set Up Your Telegram Interface
Start by creating a Telegram bot through BotFather. Once you have your bot token, add a Telegram Trigger node to your n8n workflow. This becomes your primary interface, turning every message into a workflow execution.
The beauty of Telegram is its simplicity. No complicated dashboards or interfaces. Just open your phone, send a message, and get results. The trigger node captures the chat ID automatically, which becomes crucial for maintaining conversation context.
Step 2: Configure the AI Agent with Custom Instructions
The AI Agent node is where the magic happens. Connect it to GPT-4.1 and load it with a comprehensive system prompt that defines a three-phase blog creation process.
Phase one is brainstorming. When you ask for blog ideas, the agent calls the Idea Generation tool, which uses Perplexity to scan current trends, Reddit discussions, and news to suggest five relevant topics complete with context.
Phase two is outlining. Once you pick a topic, the agent drafts a structured outline for your approval. No full posts yet, just the skeleton. This keeps things iterative and gives you control.
Phase three is the full draft. After you greenlight the outline, the agent writes the complete blog post, mimicking a specific writing style you've provided. The system prompt includes an example of your natural voice, so every output feels authentically yours.
Connect a Window Buffer Memory node to maintain context across eight messages. This means the AI remembers what you discussed earlier in the conversation, making the whole experience feel natural and fluid.

image_1.png
Step 3: Add Specialized Research Tools
The workflow includes two powerful research capabilities through Tool Workflow nodes.
The Research Tool takes your query, rewrites it for optimal research depth using GPT-4o-mini, then sends it to Perplexity's sonar model. What comes back is comprehensive analysis covering current technologies, challenges, and trends, all with proper citations. When the AI agent references this research in your blog post, readers get credible, sourced information.
For general web searches, there's also a SerpAPI tool that handles quick lookups without the full research treatment. The agent knows when to use each tool based on your request.
Step 4: Enable Google Drive Integration
Once your blog post is ready, you don't want to copy and paste it manually. That's where the Google Drive tools come in.
The Create File tool takes your finished content and generates a new Google Doc in your Drive, automatically converting plain text to a properly formatted document. The agent asks you for a filename and handles the rest.
There's also an Update File tool for revisions. If you need changes to an existing document, the agent can modify it directly in Drive without creating duplicates.
Both tools are connected to the AI Agent as available functions, meaning it can call them autonomously when you ask to save or update content.
Step 5: Handle Output Formatting
Telegram has a 4,096 character limit per message. Long blog posts would get cut off or fail to send without proper handling.
The Code node solves this elegantly. It takes the AI agent's output, escapes special markdown characters that might break formatting, then splits the content into chunks that fit within Telegram's limits. Each chunk gets sent as a separate message, creating a seamless reading experience.
This node sits between the AI Agent and the final Telegram response node, working silently in the background to ensure everything displays correctly.
Step 6: Test and Refine Your Workflow
With all components connected, activate your workflow and send your first message to the Telegram bot. Try asking for blog ideas about a specific niche. The agent should call the Idea Generation tool and return five suggestions with context.

image_2.png
Pick one idea and ask for an outline. Review it, suggest changes if needed, then approve it. The agent will generate the full blog post, maintaining your writing style throughout.

image_3.png
Finally, ask the agent to save the post to Google Drive. It should create a new document and provide you with confirmation.

image_4.png
Why This Workflow Changes the Game
This setup transforms how you create content. Instead of staring at a blank screen, you're having a conversation with an AI assistant that understands your process, remembers your preferences, and handles the technical details.
Freelance writers can use it to speed up client projects. Marketing teams can maintain consistent blog output without burning out. Solo entrepreneurs can finally keep their content calendars full.
The research capabilities mean you're not just generating fluff. Every post can be backed by current data and properly cited sources. The Google Drive integration keeps everything organized without manual file management.
And because it's all happening through Telegram, you can brainstorm ideas while commuting, approve outlines during lunch, and review final drafts from your phone. The workflow meets you wherever you are.
Take Your Content Creation Further
Once you've built this foundation, consider expanding it. You could add an image generation tool for featured images, integrate with WordPress for direct publishing, or create additional sub-workflows for different content types like social media posts or email newsletters.
The modular nature of n8n makes these additions straightforward. Each new capability plugs in as another tool the AI agent can access when needed.
Content creation doesn't have to be a grind. With the right automation, it becomes a collaborative process where you focus on strategy and creativity while AI handles research, drafting, and organization. This workflow gives you that partnership, accessible from anywhere, ready whenever inspiration strikes.
Share this article
Help others discover this content
Tap and hold the link button above to access your device's native sharing options
More in Data Processing & Analysis
Continue exploring workflows in this category

Data Processing & Analysisintermediate
1 min read
Generate Creative Solutions with Dual AI Agents, Randomization & Redis - Workflow
Kazi Sakib
Oct 21
Est: 35 minutes

Data Processing & Analysisadvanced
1 min read
Fully Automated Tech News Publishing Pipeline with n8n, OpenAI, Google Workspace & Slack
Nayma Sultana
Oct 20
Est: 1 hour

Data Processing & Analysisintermediate
1 min read
Build an AI-Powered Data Analytics Department with n8n and OpenAI: A Multi-Agent Workflow Guide
Kazi Sakib
Oct 20
Est: 45 minutes