Process Voice Messages and Answer with AI
Automatically convert Telegram voice messages to text, search your knowledge base with RAG, and respond instantly. Perfect for support teams handling voice queries 24/7. Or people in the field, that want to quickly search based on a voice message.
Last updated
October 17, 2025
Connectors used
Tags
Key Takeaways
- Voice messages converted to text - AssemblyAI transcribes Telegram voice messages automatically
- RAG-powered answers - The transcribed question is used to search your Needle knowledge base
- Two response paths - Sends both a text reply and an optional voice reply back to Telegram
- Customizable - Swap the AI model, connect a different knowledge base, or remove the voice response path
What This Workflow Does
This workflow lets customers or team members send voice messages in Telegram and get AI-generated answers back. It transcribes the voice message using AssemblyAI, searches your Needle knowledge base with RAG, and replies in Telegram with a text answer. An optional second path also converts the answer to speech via ElevenLabs and sends a voice reply.
Use cases:
- Support teams handling voice queries from customers
- Field workers who need hands-free access to documentation
- Anyone who prefers speaking over typing when asking questions
How It Works
| Step | What Happens |
|---|---|
| 1. Telegram trigger | A voice message is sent in your Telegram group |
| 2. Retrieve audio file | An HTTP request fetches the voice file from Telegram's API |
| 3. Transcribe with AssemblyAI | The audio is sent to AssemblyAI for speech-to-text conversion |
| 4. Wait for transcription | A short delay ensures the transcription is complete |
| 5. Get transcription result | The finished text is retrieved from AssemblyAI |
| 6. AI searches knowledge base | GPT uses the transcribed text to query your Needle collection (RAG) |
| 7. Send text reply | The AI's answer is sent as a text message in Telegram |
| 8. Send voice reply (optional) | ElevenLabs converts the answer to speech and sends it as a voice message |
Setup Instructions
- Create a Telegram bot via @BotFather and save the bot token
- Disable privacy mode in @BotFather:
/mybots> Your Bot > Bot Settings > Group Privacy > Turn OFF - Add the bot to your Telegram group as a member
- Get your Chat ID using the "List Chats" node or @getidsbot (must be numeric, e.g.
-1001234567890) - Get an AssemblyAI API key from assemblyai.com
- Replace
<YOUR TELEGRAM BOT TOKEN>in both HTTP/Telegram API nodes with your bot token - Replace
<YOUR AssemblyAI TOKEN>in both AssemblyAI nodes with your API key - Upload your support docs to a Needle collection
- Open the AI node, select
search_collection, and choose your Needle collection - (Optional) Connect your ElevenLabs account for voice replies
- Click "Use template" and run the workflow
Customization
| What You Can Change | How |
|---|---|
| AI model | Change the model in the AI node (default: GPT-4.1) |
| Knowledge base | Upload different documents to your Needle collection |
| Voice reply | Remove the ElevenLabs path if you only want text responses |
| Voice settings | Change the ElevenLabs voice ID, stability, or similarity boost |
| System prompt | Edit the system message in the AI node to adjust tone or word limit |
FAQ
Q: Why isn't my bot responding to voice messages? A: The most common cause is privacy mode. Disable it via @BotFather so the bot can see all messages, not just direct mentions.
Q: What audio formats are supported?
A: Telegram sends voice messages as .oga files by default. AssemblyAI also supports .mp3, .wav, and .m4a.
Q: What format should the Chat ID be in?
A: It must be a numeric ID like -1001234567890, not a username or @handle.
Q: Do I need the ElevenLabs voice reply path? A: No. The workflow sends a text reply by default. The ElevenLabs path is optional and can be removed if you only want text responses.
Q: How does the transcription work? A: The workflow sends the audio file to AssemblyAI's API, waits briefly for processing, then retrieves the transcribed text. This text is used as the query for the AI node.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.