Call Center¶
An AI-powered business coaching system that provides real-time support to Business Advisors (BAs) during phone calls with young entrepreneurs in rural Kenya, helping them analyze business situations and deliver actionable micro-interventions.
Purpose¶
No business context provided yet — add a context.md to enrich this documentation.
Based on the workflow configuration, this appears to be part of the Educate! Mshauri Digital Coaching System, designed to support Business Advisors who provide coaching to youth entrepreneurs aged 18-30 in rural Kenya. The system helps BAs quickly analyze youth business situations during live phone calls and provides clear, actionable micro-strategies that can be relayed directly to help increase business profits by at least 20% over time.
How It Works¶
- Chat Interface: The workflow starts when a user sends a message through a public chat interface
- AI Processing: The message is processed by Mshauri, an AI coach that specializes in business coaching for rural micro-businesses
- Context Analysis: The AI analyzes the input to determine if it contains youth contact information (phone number, name, business type)
- Data Retrieval: If a phone number is detected, the system automatically retrieves the latest business performance summary for that youth
- Problem Identification: The AI identifies the core business problem and checks for any escalation triggers (debt, family conflict, emotional distress)
- Action Generation: Based on the analysis, the system generates exactly 3 micro-actions with specific BA scripts
- Response Delivery: The BA receives a structured response with problem analysis, business context, micro-actions, and follow-up questions
Workflow Diagram¶
graph TD
A[When chat message received] --> B[AI Agent1]
B --> C[OpenRouter Chat Model]
B --> D[Simple Memory]
B --> E[get_summary]
F[getUserRecord] --> G[getProfitData]
G --> H[Aggregate]
H --> I[AI Agent - Disabled]
I --> J[Postgres Chat Memory - Disabled]
I --> K[dailySalesDataCollection - Disabled]
I --> L[updateUserDataTool - Disabled]
I --> M[updateUserStatusTool - Disabled]
I --> N[OpenRouter Chat Model1 - Disabled]
I --> O[Insert rows in a table - Disabled]
P[setOutputField - Disabled]
Q[Sticky Note]
Trigger¶
Chat Trigger: A public chat interface that accepts messages with the initial greeting "Hi there! 👋I am your Business Adviser. How can I assist you today?"
- Type: Public chat interface
- Webhook ID: 341f76d9-ac26-472c-a9a5-a8ea368f66ff
- Access: Public (no authentication required)
Nodes Used¶
| Node Type | Purpose |
|---|---|
| Chat Trigger | Receives incoming chat messages from users |
| AI Agent | Main business coaching logic using Mshauri AI system |
| OpenRouter Chat Model | Google Gemini 3 Flash Preview model for AI processing |
| Buffer Window Memory | Maintains conversation context (20 message window) |
| Postgres | Database operations for user records and profit data |
| Aggregate | Combines business records data for AI analysis |
| Workflow Tools | Integration with external workflows for data operations |
| Sticky Note | Development notes and TODOs |
External Services & Credentials Required¶
OpenRouter API¶
- Service: OpenRouter (for Google Gemini 3 Flash Preview)
- Credential Name: "Prompt Testing for Design team"
- Purpose: Powers the AI coaching responses
PostgreSQL Database¶
- Service: Supabase PostgreSQL
- Credential Name: "PostgresOnSupabase"
- Purpose: Stores user records, business data, and chat logs
- Tables Used:
youthEntrepreneursReal- User profiles and business informationdailyProfitTracking- Daily sales and profit datachatLog- Conversation history
Environment Variables¶
No explicit environment variables are configured in this workflow. All external service connections use stored credentials.
Data Flow¶
Input¶
- Chat messages containing:
- Youth phone numbers
- Business questions from BAs
- Youth names and business types
Processing¶
- Retrieves user records from PostgreSQL
- Fetches recent profit/sales data (last 20 records)
- Analyzes business patterns and trends
- Generates coaching recommendations
Output¶
- Structured BA responses including:
- Problem identification
- Business context and insights
- 3 specific micro-actions with BA scripts
- Follow-up questions for next call
- Chat logs stored in database
Error Handling¶
The workflow includes basic error handling through: - Always output data setting on profit data retrieval - Disabled fallback nodes for alternative processing paths - Tool validation for external workflow integrations
No explicit error handling paths are visible in the current active configuration.
Known Limitations¶
Based on the system prompt and configuration: - Requires phone numbers in specific format (+254) for proper data retrieval - Limited to business coaching scope (politics, relationships, health advice are out of scope) - Escalation triggers require manual BA intervention - Some nodes are disabled, suggesting incomplete implementation - Performance concerns noted about efficiency after every message
Related Workflows¶
The workflow integrates with several external workflows: - dailySalesDataCollection (ID: fBc6cSMp9Wz1brlZ) - Records daily business data - updateUserDataTool (ID: xVkMVJOCq5ptCOHj) - Updates user profile information - updateUserStatusTool (ID: nfVcA8ei8x9dE06Z) - Manages user onboarding status - getSummary (ID: F9KfqTfc89UT8Vv2) - Retrieves business performance summaries
Setup Instructions¶
- Import the workflow into your n8n instance
- Configure credentials:
- Set up OpenRouter API access with Google Gemini 3 Flash Preview model
- Configure PostgreSQL connection to Supabase database
- Database setup:
- Ensure required tables exist:
youthEntrepreneursReal,dailyProfitTracking,chatLog - Set up proper indexes for phone number lookups
- Ensure required tables exist:
- External workflows:
- Import and configure the four related workflows listed above
- Ensure proper workflow IDs are referenced in tool configurations
- Test the chat interface:
- Access the public chat URL
- Test with sample youth data and phone numbers
- Enable disabled nodes if needed for full functionality
- Monitor performance and optimize database queries for scale
The workflow is currently active and ready to handle BA coaching requests through the chat interface.