What This Workflow Does
The Speech Support Workflow is an AI-powered automation that integrates with Telegram to provide intelligent, conversational support through dynamic system prompting. It leverages multiple AI models including Google Gemini and OpenAI to deliver contextual responses while managing conversation history and formatting messages for optimal Telegram compatibility.
How It Works
The workflow begins when a user sends a message through Telegram, triggering the automation pipeline. The system analyzes the incoming request and dynamically sets the appropriate AI system prompt based on the user’s needs. The workflow then processes the query through multiple AI models, maintains conversation context using memory management, and formats the response to comply with Telegram’s message requirements. Long responses are automatically chunked into smaller segments to ensure reliable delivery, while special characters are removed to prevent parsing issues.
Use Cases
- Customer Support Automation: Deploy an intelligent chatbot that handles common customer inquiries through Telegram with context-aware responses.
- Technical Assistance: Provide real-time technical support with multi-turn conversations that remember previous interactions and maintain conversation history.
- Personal Assistant Services: Create a versatile AI assistant that adapts its behavior based on specific user requests and maintains personalized conversation contexts.
- Accessibility Support: Offer speech-enabled support for users who prefer conversational interfaces with dynamic AI assistance tailored to their specific needs.
- Content Generation on Demand: Generate formatted content through Telegram that is automatically optimized for message delivery and readability.
Nodes Used
- Telegram Trigger: Initiates workflow when messages arrive in Telegram.
- Agent Node: Orchestrates AI decision-making and task delegation.
- Google Gemini Chat: Processes natural language with Google’s advanced AI model.
- OpenAI Node: Integrates OpenAI’s language models for response generation.
- Memory Manager: Tracks and manages conversation history and context.
- Memory Buffer Window: Maintains a rolling window of conversation context.
- Set Node: Configures variables and dynamic system prompts.
- If Node: Implements conditional logic for response routing.
- Switch Node: Directs workflow based on multiple conditions.
- Code Node: Handles message formatting and chunking for Telegram compatibility.
- Telegram Send: Delivers formatted responses back to users.
- Sticky Note: Provides workflow documentation and notes.
Prerequisites
- n8n instance with access to workflow creation and editing.
- Telegram Bot Token for connecting to Telegram messaging platform.
- Google Gemini API credentials and appropriate API access.
- OpenAI API key with sufficient permissions and usage limits.
- Understanding of system prompting and AI model configuration.
- Basic knowledge of message formatting requirements for Telegram.
- Access to memory management features within n8n.
Difficulty Level
Intermediate to Advanced. This workflow requires understanding of AI model integration, API configuration, conversation memory management, and Telegram message formatting constraints. Users should have experience with multi-step automations and be comfortable configuring multiple AI service connections. The dynamic system prompting and message chunking logic adds complexity suitable for users beyond beginner level.
This workflow template is shared under the n8n fair-code license. Free to use and modify.
Leave a Reply