Telegram SQL Agent: Voice & Text Input → Anthropic-Powered Database Query Agent with Window Buffer Memory
Problem:
A data team needed a conversational interface to query a Supabase database using natural language through Telegram, typing SQL queries manually was impractical for non-technical team members, and voice queries had no processing pipeline to convert speech to database-executable requests.
Solution:
Built a Telegram-triggered n8n SQL Agent that identifies and reroutes incoming message types, audio messages are retrieved from Telegram and transcribed to text via OpenAI's Convert Audio to Text transcription model; text messages pass directly, both paths converge at an Edit Fields node that prepares the query, which is passed to an Anthropic Claude-powered SQL Agent with Window Buffer Memory that queries the connected Supabase database, interprets the results intelligently, and sends a natural language response back to the user directly in Telegram.
Result:
Delivered a voice and text capable conversational database interface that lets any team member query a live Supabase database through Telegram in plain English or spoken audio, the Anthropic SQL Agent interprets the intent, executes the correct query, and returns readable insights, making database access available to the entire team without SQL knowledge or platform access.
