Skip to content
IAIsomiddin Abdunabiev

10 November 2026 · updated 11 November 2026

· Lecturer & AI Consultant · Tashkent, Uzbekistan

Build an AI Voice-to-Blog System with Telegram, n8n & Gemini

Learn how to build an automated AI system that turns voice messages into ready-to-publish blog posts using Telegram, n8n, Google Gemini, and Next.js.

  • #ai automation
  • #voice to text
  • #n8n workflow
  • #nextjs blog
  • #gemini api
  • #seo optimization

Overview

In this article, I will explain how I built an automated system that turns simple voice messages into fully formatted, trilingual blog posts using the Telegram messenger, the n8n automation platform, Google Gemini AI, and the Next.js web framework. This voice-to-blog system takes in audio, writes text, generates images, and publishes drafts to a website entirely without human intervention. This technological solution saves time, builds a personal brand, and allows for rapid publishing without losing ideas.

Why I built an automated voice-to-text blog

My best ideas rarely come to me when I am sitting at a computer keyboard. Usually, new thoughts strike while I am on the go, taking a walk, or after a good conversation. Turning these ideas into a polished, highly readable article takes hours. Because of this, many valuable thoughts never get published and simply fade away.

At the same time, I really need a personal blog. If someone searches my name online, they should be able to see my perspective on business and technology. A personal brand is an asset that compounds over time. Every new post on a website is one more page that search engines can discover.

The real bottleneck was not a lack of ideas, but the writing process itself. So, I boiled the problem down to one core question: what if I just spoke, and computer programs and AI handled everything else, from my voice to a finished web page? This question drove me to build a fully automated system.

How the system works: From Telegram bot to finished website

From a user's perspective, this automated blog system works very simply. I open my bot in the Telegram messenger and press a custom start button. Then, I send as many voice messages as I want. Once I hit the finish button, the Telegram bot notifies me that it has started writing. A minute or two later, the bot sends me a preview of the article. This preview includes a cover image, a title, a short description, and the first paragraph. Below it are buttons to either publish or cancel. Using the system requires no complex editing software or even a laptop.

The architecture is a seven-part chain where each piece performs one specific task. The Telegram bot is the only interface I use. A service called "ngrok" gives my laptop a public HTTPS address so Telegram can deliver messages directly to my local machine. Inside an isolated container platform called "Docker" runs "n8n". This n8n instance is the workflow engine that receives every message and automatically executes the steps.

Two separate AI models are used for text and image generation. Google's "Gemini" model listens to the voice messages and writes the article in three languages. OpenAI's image generation model draws custom illustrations for the post.

The final data is sent to the Application Programming Interface (API) of my website, which is built on the "Next.js" framework. The website receives the incoming data as a draft. All posts, images, and comments are currently stored in a local database called "SQLite". The golden rule here is that every connection between these parts happens via simple HTTP requests. Because of this, any piece of the system can easily be swapped out for another.

The coding process: How Claude AI acted as a software engineer

I did not write the code for this system by hand. I explained what I wanted to Anthropic's "Claude" AI. The "Claude Code" tool acted as a true software engineer throughout the entire project. On the website side, Claude built the entire blog. This includes the API system for creating, reading, publishing, and deleting posts.

Claude also built a system that strictly validates every incoming post, a drafts system that returns a 404 error code to external users until approved, and an image serving system directly from the site. It even added an automated sitemap for search engines and a Google-authenticated comments feature.

On the automation side, Claude connected to my local n8n instance via the Model Context Protocol (MCP) server. Claude programmatically assembled a workflow consisting of twenty-four nodes. It loaded API keys directly from an environment file into n8n's encrypted storage. As a result, not a single secret key was exposed in the code. What I loved most was that before finishing the job, Claude fully tested the system and deleted the test draft.

Uchta sunʼiy intellekt bilan ovozdan blogga pipeline qanday qurdim: Claude, Gemini va OpenAI

Text and image generation: How Gemini and OpenAI models work

Google's "Gemini" model receives all my voice messages in a single prompt, as raw audio, and in the correct order. There is no separate transcription step to convert voice to text. The Gemini model listens and writes at the same time. This approach is much simpler and helps preserve the context of the entire speech in one place.

The instructions given to the model are short but strict. Gemini must write a single post in my voice, from a first-person perspective. It absolutely must keep my ideas, thoughts, and examples. It needs to remove filler words, repetitions, and messy starts. It should never invent facts, numbers, or stories that I did not mention. The primary version is generated in Uzbek using the Latin alphabet.

The AI's response is forced into a strict JSON format, which is a standard structure for storing and transmitting data. This format includes a title up to ninety characters, a one-sentence description for search results, sectioned headings, tags, and exactly three image ideas. Because the format is guaranteed, the output perfectly matches the site's interface every single time.

For images, OpenAI's DALL-E model is used. Gemini suggests three illustration ideas for the beginning, middle, and end of the post. If the Uzbek text is longer than six hundred words, the system draws all three. A strict style prompt is appended to every request, ensuring the images are clean, modern editorial illustrations without any text. The images are in JPEG format and kept small in file size so web pages load quickly.

Process management: Handling errors and security in n8n

The "n8n" automation platform acts as the conductor tying everything together. A few smart decisions within it made the system highly reliable. There is a single router for everything in the system. Every Telegram update passes through one small code step and gets routed down the correct path.

Voice messages are stored in a dedicated database table, not in the system's memory. If I send multiple voice messages in a row, n8n processes them in parallel. Keeping a list in memory could result in messages silently dropping. Instead, every message is saved in its own row, tagged with the current session.

If Gemini, OpenAI, or the website goes down, the bot sends me an error via Telegram and saves my voice messages. I simply press the finish button again. Nothing breaks silently. AI requests automatically retry once before giving up, since these services occasionally experience brief outages.

From a security standpoint, the bot can only be used by my personal Telegram account. The site's interface requires a secret key, and nothing can be changed without it. All keys are stored in an encrypted vault. During development, I immediately rotated any keys that were accidentally logged in plain text, because an exposed key is a compromised key.

SEO and multilingualism: Why publishing in three languages matters

Since the main goal is to be found online, the site automatically performs Search Engine Optimization (SEO) for every post. A proper structure is crucial for search engines to understand the site well and rank it higher.

Every post is available in Uzbek, English, and Russian. The pages inform search engines about each other using special tags called "hreflang". This means that when users search on Google, they will see the version of the article in their own language.

The article's URL is automatically generated from the Uzbek title. The description is written to be short and concise specifically for search engine results. Every published post is immediately added to the sitemap. Thus, a single voice session provides three separate opportunities to be discovered in the three languages people in Uzbekistan and the region actually search in.

How can you build an AI system like this yourself?

If you want to build a similar automated system for yourself, pay attention to the following practical steps:

1. Start with the destination. Give your site a small, strict interface that accepts a post in JSON format and saves it as a draft. Everything else will connect to this.

2. Run the n8n platform on your local computer using Docker. The n8n platform is free and more than enough for a single person.

3. Create a bot in the Telegram messenger via BotFather and expose your n8n system using tunnels like ngrok or Cloudflare. Get a persistent tunnel domain from day one so restarting the system does not break the bot.

4. Send all audio into a single multimodal prompt with a strict JSON schema. Skip the separate voice-to-text transcription step if you do not need raw transcripts.

5. Store incoming waves of data, like voice messages, in a persistent table rather than workflow memory.

6. Always include a human approval step. A preview function with publish or cancel buttons protects your reputation and your name.

7. Test the entire pipeline with dummy data before fully trusting the system, and configure it so every error sends you a notification.

Uchta sunʼiy intellekt bilan ovozdan blogga pipeline qanday qurdim: Claude, Gemini va OpenAI

Key takeaways

- A voice-to-blog system saves time and allows for rapid publishing without losing your ideas.

- Ensuring that each part of the system works independently and connects via HTTP requests guarantees its stability.

- You can achieve the exact desired output by giving AI models clear instructions and a strict JSON schema.

- Multilingual support and SEO optimization greatly help articles get discovered easily on search engines.

- Leaving a human approval step in automated systems is crucial to prevent errors.

- The most common failures happen not within the AI models, but in the connections between different tools and services.

Future plans and business opportunities

Currently, this system only works when my laptop is on. The next steps are to set up a persistent tunnel address, add an auto-restart function, and then migrate the site and the n8n system to a public server with a Postgres database. After that, I want to teach the bot to accept actual images along with voice messages.

I also build these kinds of automated systems for other people and companies. This concept works far beyond a personal blog. For example, you could create a company blog driven by the founder's voice notes, product updates published in three languages, or an internal knowledge base that turns expert speeches into documentation.

Clients receive a fully configured bot on their accounts, the automation pipeline, and integration with their existing site. All keys and data remain with the client. If you need a system like this, you can contact me and let me know what you want to publish and where. By the way, the draft for this very article was written by Claude AI, and I approved it via Telegram. The system essentially published the story of how it was built.

Uchta sunʼiy intellekt bilan ovozdan blogga pipeline qanday qurdim: Claude, Gemini va OpenAI

Frequently asked questions

How does AI voice-to-text generation work?

In AI voice-to-text generation, specialized neural networks analyze human speech and convert it into written text. Modern models not only recognize words but also understand the context of the speech, formatting it into grammatically correct sentences. This technology is widely used to save time and speed up content creation.

What is the n8n platform and what does it do?

n8n is a visual automation tool designed to connect various applications and services together. Through the n8n platform, users can create workflows that automatically transfer data from one system to another without writing code. This platform allows you to delegate repetitive tasks to machines.

Why is SEO optimization necessary for websites?

SEO optimization ensures that a website ranks higher in search engines like Google or Bing. Proper headings, keywords, and sitemaps make it easier for more users to find your content. In turn, SEO optimization increases site traffic and boosts personal brand recognition.

Is it safe to manage a website via a Telegram bot?

Yes, if the system is configured correctly, managing a website via a Telegram bot is a very secure method. For security, the bot should be restricted to respond only to a specific user ID. Additionally, using secret API keys for data transmission prevents unauthorized access.

What is the difference between Gemini and other AI models?

Gemini is a multimodal model developed by Google, meaning it has the ability to understand text, audio, and images simultaneously. This multimodal feature allows the Gemini model to process voice messages directly without a separate transcription program. Many other models are optimized to work exclusively with text.

Comments (0)

No comments yet. Be the first.