Library / Chatbots & Messaging Bots
Chatbots & Messaging Bots
Reply to Telegram Text and Voice Messages with Gemini
When a Telegram text or voice message arrives, voice is transcribed by OpenAI and a Gemini agent writes the reply.
What it does
## Processing Telegram Messages: This section handles incoming messages from Telegram. It first checks if the message contains text. 1. Text Message: If the message includes text, it's directly routed to the analysis switch node. 2. Audio Message: If the message is an audio file: * The audio file is downloaded. * The audio is transcribed into text. * The transcribed text is then sent to the analysis switch node. Finally, the analyzed text (whether directly from a text message or transcribed from audio) is forwarded for further processing based on the analysis results.
The steps
- AI Agent
- Google Gemini Chat Model
- Recieve Telegram Message
- Check For Text or Voice Message
- Download Audio File
- Transcribe Audio File
- If Voice Message
- Code to remove unwanted characters from LLM response
- Code to split output into chunks under 4000 characters
- Respond to Telegram Message
- Wipe Conversation Memory
- Store Conversation Memory
- Set prompt to start a new speech
- Set prompt to generate a speech based on the feedback
16 steps in total.
Similar automations
Chatbots & Messaging BotsChat by Voice or Text on Telegram Multilingually15 stepsChatbots & Messaging BotsTelegram Voice and Text Chatbot with GPT-4o11 stepsTranslation & LanguageTranslate WhatsApp Voice and Text Messages with OpenAI and Groq44 stepsChatbots & Messaging BotsChat with a Telegram OpenAI Agent by Voice36 steps