Telegram Multi-Media AI Bot with Gemini & PostgreSQL

AI-powered Telegram bot processes text, voice, video, images, and documents in media groups using Gemini AI and PostgreSQL for smart grouping and responses.

n8n
Telegram Multi-Media AI Bot with Gemini & PostgreSQL

This advanced n8n workflow creates a sophisticated Telegram AI assistant that excels at handling multi-file media groups sent together. It uses PostgreSQL databases to manage media queues, group files by chat, and maintain conversation histories, solving Telegram's challenge of processing bundled media coherently. Files are intelligently parsed—transcribing voice/video, describing images/audio, and extracting content from documents like PDF, CSV, HTML, JSON, and more—with AI fallbacks for unsupported formats.

Powered by Gemini AI, the bot analyzes all processed content to generate insightful, context-aware responses. Responses are formatted in Telegram-safe MarkdownV2, auto-split if exceeding 4096 characters, ensuring reliable delivery. Error handling gracefully manages unsupported files, providing user-friendly fallbacks.

Ideal for customer support, virtual assistants, or content analysis bots, this workflow saves hours of manual processing. It integrates seamlessly with Telegram webhooks, PostgreSQL, and Gemini, offering scalability for high-volume chats. Benefits include reduced development time, robust multi-modal support, and database-driven persistence for production use.

$24.99
Last updated October 3, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related Utilities workflows

More from BestWorkflows

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.