Conversational Telegram Bot with GPT-4o for Text and Voice
detail.loadingPreview
Build an intelligent Telegram bot powered by GPT-4o that understands both text and voice messages. This workflow allows your bot to engage in natural conversations, transcribe voice notes, and respond intelligently to user requests, all within Telegram.
About This Workflow
This n8n workflow empowers you to create a sophisticated conversational Telegram bot leveraging the cutting-edge capabilities of GPT-4o. It seamlessly handles both text and voice inputs, making interactions more natural and accessible. The bot can transcribe voice messages into text, process them through GPT-4o for intelligent responses, and maintain conversational context using simple memory. It includes a typing indicator for a more engaging user experience and sends the final AI-generated response back to the user on Telegram. Set up your Telegram bot and unlock AI-powered conversations with unparalleled ease.
Key Features
- Dual Input Handling: Processes both text and voice messages from Telegram users.
- Advanced AI with GPT-4o: Utilizes GPT-4o for intelligent text generation and understanding.
- Voice-to-Text Transcription: Automatically transcribes incoming voice messages into text for processing.
- Contextual Memory: Maintains conversational flow by remembering previous interactions.
- Typing Indicator: Enhances user experience by showing a typing action while the bot processes requests.
How To Use
- Set up Telegram Bot: Obtain an API token from BotFather on Telegram and configure the 'Telegram Trigger' and subsequent Telegram nodes with your token.
- Configure OpenAI Credentials: Add your OpenAI API key to the 'OpenAI Credential' in n8n.
- Connect Nodes:
- The 'Telegram Trigger' node listens for incoming messages.
- The 'Text Or Voice' switch node directs messages based on whether they are text or voice.
- For voice messages, the 'Get Voice' node retrieves the file, and the 'Transcribe The Voice' node converts it to text.
- For text messages (or transcribed voice), the 'Send Context To AI Agent' node prepares the input and session ID.
- The 'AI Agent' node processes the input using GPT-4o.
- The 'Simple Memory' node helps maintain conversational context.
- The 'Send Response To Telegram' node delivers the AI's reply back to the user.
- Customize AI Behavior: Modify the 'systemMessage' in the 'AI Agent' node to define the bot's personality and instructions.
- Activate Workflow: Enable the workflow in n8n to start receiving and responding to messages on Telegram.
Apps Used
Workflow JSON
{
"id": "b7f4494a-d6d8-479c-919f-93a8607fc52a",
"name": "Conversational Telegram Bot with GPT-4o for Text and Voice",
"nodes": 7,
"category": "Personal",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: b7f4494a-d6d8...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Automate Your Daily Briefing: News, Emails, and Tasks
Streamline your day by automatically fetching the latest news from Times of India, important emails from your Gmail, and your upcoming Todoist tasks. Get a consolidated, beautifully formatted daily digest delivered straight to your inbox.
AI Music Generator with Suno V3.5 (KIE.ai)
This n8n workflow automates AI music generation using the KIE.ai API, powered by the Suno V3.5 model. Users simply submit music prompts, styles, and titles via a web form, and the system handles real-time generation and delivery of the final audio output. It's perfect for quickly creating custom music for various needs.
Smart Expense Tracking with Telegram & AI
Automate your personal finance management by turning your Telegram chat into an intelligent expense tracker. Simply send a photo of a receipt or a text message, and this workflow uses AI to categorize your spending, extract crucial details, and provide instant summaries.