Support Chatbot¶
An AI-powered support chatbot that provides instant assistance to SkillUp Bootcamp team members through Telegram messaging, with the ability to upload and search through knowledge base documents to deliver contextual guidance on program operations, safeguarding protocols, and daily procedures.
Purpose¶
No business context provided yet — add a context.md to enrich this documentation.
Based on the workflow configuration, this appears to be designed as a support system for the SkillUp Bootcamp program, serving Program Officers, Trainers, Site Assistants, and Community Engagement Assistants. The chatbot helps team members navigate daily operations, understand safeguarding protocols, resolve issues, and maintain program quality standards while embodying Educate!'s cultural values.
How It Works¶
The workflow operates in two main modes:
Document Upload Mode: 1. Users access a web form to upload PDF, CSV, or JSON documents 2. The system identifies the file type and routes it to appropriate processing 3. Documents are loaded, split into chunks, and converted to vector embeddings 4. The processed content is stored in an in-memory vector database for retrieval
Chat Support Mode: 1. Users send messages via Telegram to the support bot 2. The AI agent receives the message and searches the knowledge base using vector similarity 3. The agent combines retrieved information with its system prompt to generate contextual responses 4. Responses are sent back through Telegram with actionable guidance
The system is specifically configured to provide guidance on bootcamp operations, safeguarding protocols, retention strategies, and team coordination while maintaining Educate!'s cultural standards.
Workflow Diagram¶
graph TD
A[File Upload Form] --> B[Workflow Configuration]
B --> C[Route by File Type]
C --> D[Add Metadata - PDF]
C --> E[Add Metadata - CSV]
C --> F[Add Metadata - JSON]
D --> G[Vector Store - Insert Documents]
E --> G
F --> G
H[Document Loader - PDF] --> G
I[Document Loader - CSV/JSON] --> G
J[Token Splitter - 1000 Tokens] --> H
J --> I
K[OpenAI Embeddings] --> G
K --> L[Vector Store - Retrieve Tool]
L --> M[Knowledge Base Agent]
N[OpenAI Chat Model] --> M
O[Telegram Trigger] --> M
M --> P[Send a text message]
Q[Twilio WhatsApp Trigger]
R[Twilio WhatsApp Response Tool]
Trigger¶
- Telegram Trigger: Activates when users send messages to the configured Telegram bot
- File Upload Form: Web form trigger for uploading documents to the knowledge base
- Twilio WhatsApp Trigger: Configured but not currently connected (appears to be for future WhatsApp integration)
Nodes Used¶
| Node Type | Purpose |
|---|---|
| Form Trigger | Provides web interface for document uploads |
| Set (Workflow Configuration) | Adds metadata like upload date, filename, and file type |
| Switch (Route by File Type) | Routes documents based on MIME type (PDF, CSV, JSON) |
| Set (Add Metadata) | Adds document-specific metadata for each file type |
| Document Loader | Processes PDF and CSV/JSON files into searchable format |
| Token Splitter | Splits documents into 1000-token chunks with 100-token overlap |
| Vector Store | Stores and retrieves document embeddings for similarity search |
| OpenAI Embeddings | Converts text to vector embeddings for semantic search |
| OpenAI Chat Model | GPT-4.1-mini model for generating responses |
| Agent | Orchestrates the AI assistant with access to knowledge base tools |
| Telegram | Sends responses back to users via Telegram |
External Services & Credentials Required¶
- OpenAI API: For embeddings and chat completion
- Credential: "OpenAi account"
- Used for: Text embeddings and GPT-4.1-mini chat model
- Telegram Bot API: For receiving and sending messages
- Credential: "Waringa"
- Used for: Bot messaging functionality
- Twilio API: For WhatsApp integration (configured but not active)
- Credential: "twilio samy b"
- Used for: WhatsApp messaging (future feature)
Environment Variables¶
No explicit environment variables are defined in this workflow. All external service configurations are handled through n8n's credential system.
Data Flow¶
Input: - Document uploads (PDF, CSV, JSON files) - Telegram messages from users - File metadata (name, type, upload date)
Processing: - Documents are chunked and converted to vector embeddings - User queries are matched against the knowledge base using semantic search - AI agent generates contextual responses based on retrieved information
Output: - Telegram messages with guidance and recommendations - Document processing confirmations - Structured responses following SkillUp Bootcamp protocols
Error Handling¶
The workflow includes basic routing logic for different file types but does not implement explicit error handling paths. Error scenarios that may occur: - Unsupported file formats will not match any switch conditions - OpenAI API failures could interrupt the chat functionality - Telegram API issues could prevent message delivery
Known Limitations¶
- Workflow is currently archived and inactive
- WhatsApp integration is configured but not connected to the main flow
- In-memory vector store means knowledge base is lost when workflow restarts
- No persistent storage for conversation history
- Limited to 1000-token document chunks which may fragment important context
Related Workflows¶
No related workflows are mentioned in the available context.
Setup Instructions¶
- Import the workflow into your n8n instance
- Configure credentials:
- Set up OpenAI API credentials with access to embeddings and GPT models
- Create a Telegram bot and configure the bot token
- (Optional) Set up Twilio credentials for WhatsApp integration
- Activate triggers:
- Enable the Telegram trigger webhook
- Enable the File Upload Form webhook
- Test document upload:
- Access the form webhook URL to upload test documents
- Verify documents are processed and stored in the vector database
- Test chat functionality:
- Send a message to your Telegram bot
- Verify the agent responds with relevant information
- Customize the system prompt in the Knowledge Base Agent node to match your specific use case
- Set the workflow to active to begin processing messages
Note: This workflow requires the LangChain nodes package to be installed in your n8n instance for the AI functionality to work properly.