Content: 02123.zip (44.61 KB)
Uploaded: 14.01.2026

Positive responses: 0
Negative responses: 0

Sold: 0
Refunds: 0

$7
# AI Telegram bot for SQL queries to PostgreSQL via voice and text

This automation template enables users to retrieve data from PostgreSQL through Telegram using natural language or voice messages — no SQL required. The system automatically converts queries into secure SQL commands using AI and returns formatted results. Ideal for teams needing fast, secure database access directly within a chat interface.

## Who it´s for
- Support teams using Telegram to fetch data from the database
- Analysts querying data in natural language
- Managers needing quick access to information without SQL
- Developers automating database access via chatbot
- Teams integrating AI with relational databases

## What the automation does
- Receives text and voice messages from Telegram
- Transcribes voice messages using OpenAI
- Two AI agents (LangChain) interpret intent and generate secure SQL queries
- Executes queries on PostgreSQL and returns formatted results to Telegram
- Maintains conversation context using chat memory
- Prevents direct SQL input, reducing security risks

## What´s included
- Ready-to-use n8n workflow
- Trigger and handler logic based on LangChain
- Integrations with Telegram, PostgreSQL, OpenAI, and OpenRouter
- Basic text instructions for setup and adaptation

## Requirements for setup
- n8n account with server access
- Telegram Bot Token
- PostgreSQL credentials (host, port, database name, username, password)
- OpenAI API key (for voice transcription)
- OpenRouter API key (for AI agents)

## Benefits and outcomes
- Faster data access without SQL expertise
- Reduced workload for analysts and developers
- Enhanced security via AI-based query validation
- Voice-enabled interface for database interaction
- Context-aware responses for multi-step queries
- Routine query automation via a familiar messaging app

## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet