Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. AI Agent
  2. Google Gemini Chat Model
  3. Recieve Telegram Message
  4. Check For Text or Voice Message
  5. Download Audio File
  6. Transcribe Audio File
  7. If Voice Message
  8. Code to remove unwanted characters from LLM response
  9. Code to split output into chunks under 4000 characters
  10. Respond to Telegram Message
  11. Wipe Conversation Memory
  12. Store Conversation Memory
  13. Set prompt to start a new speech
  14. Set prompt to generate a speech based on the feedback

16 steps in total.

Similar automations