Workflow

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.

Needle Team

Last updated

October 17, 2025

Connectors used

ElevenLabs
telegram_bot_api
assemblyai

Tags

Voice SupportSpeech-to-TextTelegram BotSupport AutomationRAGAssemblyAIVoice RecognitionAI Support Agent

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

StepWhat Happens
1. Telegram triggerA voice message is sent in your Telegram group
2. Retrieve audio fileAn HTTP request fetches the voice file from Telegram's API
3. Transcribe with AssemblyAIThe audio is sent to AssemblyAI for speech-to-text conversion
4. Wait for transcriptionA short delay ensures the transcription is complete
5. Get transcription resultThe finished text is retrieved from AssemblyAI
6. AI searches knowledge baseGPT uses the transcribed text to query your Needle collection (RAG)
7. Send text replyThe 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

  1. Create a Telegram bot via @BotFather and save the bot token
  2. Disable privacy mode in @BotFather: /mybots > Your Bot > Bot Settings > Group Privacy > Turn OFF
  3. Add the bot to your Telegram group as a member
  4. Get your Chat ID using the "List Chats" node or @getidsbot (must be numeric, e.g. -1001234567890)
  5. Get an AssemblyAI API key from assemblyai.com
  6. Replace <YOUR TELEGRAM BOT TOKEN> in both HTTP/Telegram API nodes with your bot token
  7. Replace <YOUR AssemblyAI TOKEN> in both AssemblyAI nodes with your API key
  8. Upload your support docs to a Needle collection
  9. Open the AI node, select search_collection, and choose your Needle collection
  10. (Optional) Connect your ElevenLabs account for voice replies
  11. Click "Use template" and run the workflow

Customization

What You Can ChangeHow
AI modelChange the model in the AI node (default: GPT-4.1)
Knowledge baseUpload different documents to your Needle collection
Voice replyRemove the ElevenLabs path if you only want text responses
Voice settingsChange the ElevenLabs voice ID, stability, or similarity boost
System promptEdit 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.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .