Skip to content

E!BA and SkillUp Bots

A comprehensive multi-channel educational assistant system that provides AI-powered support for E!BA Academy and SkillUp bootcamp operations through WhatsApp, web chat, and file upload interfaces. The system uses RAG (Retrieval-Augmented Generation) to answer questions based on program handbooks and procedures.

Purpose

No business context provided yet — add a context.md to enrich this documentation.

This workflow serves as an intelligent support system for educational programs, providing instant access to procedural knowledge and guidance through multiple communication channels. It appears to support staff members including trainers, program officers, and field operations assistants with day-to-day operational questions and procedures.

How It Works

  1. Input Reception: The system receives queries through multiple channels - WhatsApp messages (text or voice), web forms for file uploads, web chat interface, and feedback forms
  2. Message Processing: Incoming messages are analyzed to determine type (text, audio, or file) and routed to appropriate processing paths
  3. Audio Transcription: Voice messages are downloaded and transcribed using OpenAI's speech-to-text service
  4. Input Unification: All inputs (text, transcribed audio, uploaded files) are standardized into a unified format for processing
  5. Knowledge Retrieval: The system searches relevant vector databases (PostgreSQL with pgvector) containing handbook information using semantic similarity
  6. AI Response Generation: OpenAI's GPT models generate contextual responses based on retrieved knowledge and conversation history
  7. Response Formatting: Responses are cleaned of markdown formatting and optimized for the target channel (WhatsApp character limits, etc.)
  8. Delivery: Responses are sent back through the original channel (WhatsApp via Twilio, web chat, etc.)
  9. Logging: All interactions are logged to Airtable for monitoring and improvement purposes

Workflow Diagram

graph TD
    A[WhatsApp Message] --> B{Message Type?}
    B -->|Audio| C[Download Audio]
    B -->|Text| D[Unified Input Processing]
    C --> E[OpenAI Transcription]
    E --> D

    F[File Upload Form] --> G[Document Processing]
    G --> H[Vector Storage]

    I[Web Chat] --> J[Chat Agent]

    D --> K[Log to Airtable]
    K --> L{E!BA or SkillUp?}
    L -->|E!BA| M[E!BA Support Agent]
    L -->|SkillUp| N[SkillUp Support Agent]

    M --> O[E!BA Vector Search]
    N --> P[SkillUp Vector Search]

    O --> Q[OpenAI Response Generation]
    P --> Q

    Q --> R[Text Cleanup]
    R --> S[WhatsApp Response via Twilio]

    T[Feedback Form] --> U[Airtable Logging]

    H --> V[Knowledge Base Update]

Triggers

  • WhatsApp Webhook: /webhook/866505c7-43d5-4851-9c5d-d9f75b273de5 - Receives WhatsApp messages for E!BA support
  • File Upload Form: 4a1ea11f-4a87-484d-979d-b6c8ed0a3fa3 - Allows document uploads for RAG knowledge base
  • Web Chat Interface: c8667ea3-c999-4067-a177-7ad5abe5c29f - LangChain chat trigger for web-based conversations
  • Feedback Form: b28369eb-40ad-46e1-be4a-bbee9a4af0f6 - Collects user feedback on bot responses
  • Additional Upload Form: 9f14b43e-a87b-4775-adbf-3fd4c11f16d2 - Secondary document upload interface

Nodes Used

Node Type Purpose
Form Trigger Capture file uploads and feedback submissions
Webhook Receive WhatsApp messages from Twilio
Switch Route messages based on type (audio/text)
HTTP Request Download audio files from WhatsApp
OpenAI Transcription Convert voice messages to text
Code (JavaScript) Process and unify inputs, clean responses
OpenAI Chat Model Generate AI responses using GPT-4/GPT-4o-mini
LangChain Agent Orchestrate RAG-based question answering
Vector Store (PGVector) Store and retrieve document embeddings
OpenAI Embeddings Create vector representations of text
Document Loader Process uploaded files (PDF, CSV)
Text Splitter Chunk documents for vector storage
Cohere Reranker Improve search result relevance
Memory Buffer Maintain conversation context
Twilio Send WhatsApp responses
Airtable Log interactions and feedback

External Services & Credentials Required

  • OpenAI API (CrM3JP0wordbyyCE - "Waringa"): GPT models, embeddings, and transcription
  • PostgreSQL Database (tRyaSheFPXMYtL30 - "Postgres Waringa"): Vector storage with pgvector extension
  • Twilio API (vrzqfXlMQmyiGE5G - "Waringa"): WhatsApp messaging
  • Cohere API (EMLxSnhJxW3mVmnK - "CohereApi account"): Result reranking
  • Airtable API (G4SJn9uQB5lYWO9l - "EXP Training Bot"): Interaction logging
  • Google Cloud Storage (irnsG2BRzrmVor3n - "Google Service Account Waringa"): Audio file storage

Environment Variables

No explicit environment variables are defined in the workflow. All configurations appear to be handled through n8n's credential system.

Data Flow

Input: - WhatsApp messages (text or voice) - Uploaded documents (PDF, CSV) - Web chat messages - Feedback form submissions

Processing: - Audio transcription to text - Document chunking and vectorization - Semantic search through knowledge bases - AI response generation with context

Output: - WhatsApp text responses - Web chat responses - Airtable log entries - Updated vector knowledge bases

Error Handling

The workflow includes basic error handling through: - Input validation in JavaScript nodes - Fallback responses when knowledge base doesn't contain relevant information - Message type switching to handle different input formats - Escalation guidance when the system cannot provide adequate answers

Known Limitations

Based on the workflow structure: - Character limits for WhatsApp responses (1590 characters for E!BA, 800 for SkillUp) - Dependency on external service availability (OpenAI, Twilio, etc.) - Limited to specific file types for uploads (.pdf, .csv) - Manual knowledge base updates through file uploads

No related workflows are mentioned in the current documentation.

Setup Instructions

  1. Import Workflow: Import the JSON workflow file into your n8n instance

  2. Configure Credentials:

    • Set up OpenAI API credentials with access to GPT-4, embeddings, and Whisper
    • Configure PostgreSQL database with pgvector extension
    • Set up Twilio account with WhatsApp Business API access
    • Create Cohere API account for reranking
    • Configure Airtable workspace with appropriate tables
    • Set up Google Cloud Storage bucket for audio files
  3. Database Setup:

    • Create PostgreSQL tables: skillup, skillup_original, eba_mini_updated_large_dec_latest, eba_mini_updated_large_new_latest
    • Enable pgvector extension
    • Configure appropriate indexes for vector similarity search
  4. Webhook Configuration:

    • Configure Twilio webhook to point to the E!BA Bot webhook URL
    • Set up WhatsApp Business API with appropriate phone numbers
  5. Knowledge Base Population:

    • Upload initial handbook documents through the file upload forms
    • Verify vector storage is working correctly
  6. Testing:

    • Send test messages through WhatsApp
    • Upload test documents
    • Verify responses and logging functionality
  7. Monitoring:

    • Set up Airtable views for interaction monitoring
    • Configure alerts for failed executions
    • Monitor API usage and costs