GenAiHub

Last checked 8 October 2026 โ€” responded normally.

Process Multiple Media Files in Telegram with Gemini AI & PostgreSQL Database

๐Ÿค–๐Ÿ“จ Telegram AI Assistant with Multi-File Media Group Handling, Smart File Processing & PostgreSQL Integration

Live
Open / InstallLast updated October 8, 2026

Description

๐Ÿค–๐Ÿ“จ Telegram AI Assistant with Multi-File Media Group Handling, Smart File Processing & PostgreSQL Integration > AI-powered Telegram bot for text, voice, video, documents & media โ€” with database-driven grouping and Telegram-safe formatting. ๐Ÿ“‹ Description This n8n template creates a next-generation Telegram AI assistant ๐Ÿง ๐Ÿ’ฌ capable of handling text messages, media files, and documents with advanced processing, PostgreSQL integration, and AI-powered responses. It is designed to solve Telegramโ€™s media group challenge ๐Ÿ“ฆ โ€” when multiple files are sent together, they are stored, processed, and combined into one coherent AI-generated reply. โœจ Key Features ๐Ÿ“‚ Multi-file media group management with PostgreSQL: media_group media_queue chat_histories ๐Ÿ“‘ Document parsing for CSV, HTML, ICS, JSON, ODS, PDF (with AI fallback), RTF, TXT, XML, and spreadsheets. ๐ŸŽค Voice & video transcription for AI analysis. ๐Ÿ–ผ๏ธ Image, audio, and video description for richer AI context. ๐Ÿ›ก๏ธ Telegram-safe MarkdownV2 formatting with auto-splitting for messages over 4096 chars. โš ๏ธ Error fallback for unsupported file types. ๐Ÿ’ก Acknowledgment A huge thank you to Ezema Gingsley Chibuzo ๐Ÿ™Œ for the inspiration of the first version of this workflow: Create a Multi-Modal Telegram Support Bot with GPT-4 and Supabase RAG Your pioneering work laid the foundation for this improved, database-powered multi-modal assistant ๐Ÿš€ ๐Ÿท Tags telegram ai-assistant postgresql multi-file media-group file-processing voice-transcription document-parser pdf-extraction markdown-formatting n8n-template ๐Ÿ’ผ Use Case Use this template if you need an AI-powered Telegram bot that can: ๐Ÿ“ฆ Handle multiple files sent in a single message (albums, multiple PDFs, etc.). ๐Ÿงพ Extract & analyze content from many file formats. ๐ŸŽ™๏ธ Transcribe voice and video messages. ๐Ÿ—‚๏ธ Maintain chat memory for contextual AI answers. ๐Ÿ›ก๏ธ Avoid Telegram formatting errors and length limit issues. This workflow automates the full chain: Receive โ†’ Process โ†’ AI Analysis โ†’ Telegram-safe Reply. ๐Ÿ’ฌ Example User Interactions ๐Ÿ“„ Multiple PDFs with a caption** โ†’ AI extracts and summarizes all PDFs in one combined reply. ๐ŸŽค Voice message** โ†’ AI transcribes and replies with a contextual answer. ๐Ÿ“Š CSV or spreadsheet file** โ†’ AI parses and summarizes the data. ๐Ÿ–ผ๏ธ Multiple images** โ†’ AI describes each image and replies in a single message. ๐Ÿ”‘ Required Credentials Telegram Bot API** (Bot Token) PostgreSQL** (Connection credentials) AI Provider API** (OpenAI, Google Gemini, or compatible LLM) โš™๏ธ Setup Instructions ๐Ÿ—„๏ธ Create the PostgreSQL tables (Gray section SQL): media_group media_queue chat_histories ๐Ÿ”Œ Configure the Telegram Trigger with your bot token. ๐Ÿค– Connect your AI provider credentials. ๐Ÿ—‚๏ธ Set up PostgreSQL credentials in the database nodes. โ–ถ๏ธ Deploy the workflow in n8n. ๐ŸŽฏ Start sending messages and files to your bot. ๐Ÿ“Œ Extra Notes โœ… Green section ensures only one trigger per media group. ๐Ÿ“Œ Yellow section guarantees captions and files are stored in the correct sequence. โœจ Purple section formats AI output to be Telegram-safe and split if needed. ๐Ÿง  AI prompt is not fixed, allowing full customization. ๐Ÿ’ก Need Assistance? If youโ€™d like help customizing or extending this workflow, feel free to reach out: ๐Ÿ“ง Email: johnsilva11031@gmail.com ๐Ÿ”— LinkedIn: John Alejandro Silva Rodrรญguez. An n8n automation workflow template by John Alejandro SIlva.

Community Metrics

Views
794
Avg Rating
N/A
Ratings
0
Likes
0
Comments
โ€”

Author

John Alejandro SIlva

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • postgres
  • telegram
  • code
  • html
  • ai-agent
  • google-gemini-chat-model
  • postgres-chat-memory
  • google-gemini

Capabilities

  • 8 nodes
  • 794 views

Information

TypeWorkflow
Sourcen8n
AddedJuly 27, 2026

Comments

?

Others in the same category, ranked by how often they are opened.