Audio Reports Copy¶
A WhatsApp-based mentor assessment system that enables program team members to evaluate mentors through conversational AI, supporting both text and voice note interactions with mentor database lookups and personalized questioning.
Purpose¶
No business context provided yet — add a context.md to enrich this documentation.
This workflow appears to be designed for educational program administrators to conduct mentor assessments via WhatsApp. The system allows evaluators to input mentor IDs, retrieve mentor information from a Google Sheets database, and conduct structured assessments through AI-powered conversations that can handle both text messages and voice notes.
How It Works¶
- Message Reception: The workflow receives WhatsApp messages via Twilio webhook
- Message Processing: Extracts user information, detects mentor IDs (6-digit numbers), and identifies voice notes
- Voice Handling: If a voice note is received, downloads and transcribes it using OpenAI Whisper
- Mentor Lookup: When a mentor ID is detected, queries Google Sheets to retrieve mentor data including lessons and activities
- AI Conversation: Routes to appropriate AI agent based on context:
- Normal conversation for general interactions
- Mentor confirmation when mentor ID is provided
- Voice summary processing for voice note responses
- Assessment Questions: Generates personalized questions based on mentor's actual lessons and activities
- Response Delivery: Sends AI-generated responses back to the user via WhatsApp
Workflow Diagram¶
graph TD
A[WhatsApp Webhook3] --> B[Extract Message Info2]
B --> C{Has Voice Note?}
C -->|Yes| D[Download Voice File2]
C -->|No| E{Has Mentor ID?}
D --> F[Transcribe Recording]
F --> G[AI Summary]
G --> H[Send Response3]
E -->|Yes| I[Get Mentor Data from Sheets]
E -->|No| J[AI Normal Conversation]
I --> K[Code - Process Mentor Data]
K --> L[AI Confirming Mentor_ID]
L --> M[Send Response4]
J --> N[Send Response2]
O[Simple Memory3] -.-> L
P[Simple Memory] -.-> J
Q[Simple Memory4] -.-> G
R[OpenAI Chat Model6] -.-> L
S[OpenAI Chat Model] -.-> J
T[OpenAI Chat Model7] -.-> G
Trigger¶
WhatsApp Webhook - Activated when users send messages to the configured Twilio WhatsApp number. The webhook endpoint is 4c71d2c3-95d2-4fa0-9042-bbc6af78c4bf.
Nodes Used¶
| Node Type | Purpose |
|---|---|
| Webhook | Receives incoming WhatsApp messages from Twilio |
| Code | Extracts message information, detects mentor IDs, and processes mentor data |
| If (Conditional) | Routes workflow based on voice notes and mentor ID presence |
| HTTP Request | Downloads voice files and handles API calls |
| Google Sheets | Retrieves mentor data from the ELabReport spreadsheet |
| OpenAI Transcription | Converts voice notes to text using Whisper |
| AI Agent | Handles conversational logic for different scenarios |
| Memory Buffer | Maintains conversation context across interactions |
| Twilio | Sends WhatsApp responses back to users |
External Services & Credentials Required¶
- Twilio: WhatsApp messaging service
- Account SID and Auth Token
- WhatsApp sandbox or approved number
- OpenAI: AI models and transcription
- API key for GPT-4 and Whisper models
- Google Sheets: Mentor database storage
- Service account credentials
- Access to spreadsheet ID:
1Vv_gTpvI8RHPPrn0iwzypG3qKRYeLDb1HZFPDzYe5ng
Environment Variables¶
No explicit environment variables are defined in the workflow. API keys and credentials are managed through n8n's credential system.
Data Flow¶
Input: WhatsApp messages containing: - Text messages with potential mentor IDs (6-digit numbers) - Voice notes for assessment responses - User profile information (name, phone number)
Processing: - Message parsing and mentor ID detection - Voice transcription when applicable - Mentor data lookup from Google Sheets - AI-powered conversation management with memory
Output: WhatsApp responses including: - Mentor confirmation messages - Personalized assessment questions - Conversation summaries and reports - Follow-up prompts and guidance
Error Handling¶
The workflow includes basic error handling in the JavaScript code nodes: - Graceful failure handling in message extraction with fallback responses - Try-catch blocks to prevent runtime breaks - Default values for missing data fields - Error messages returned to users when processing fails
Known Limitations¶
- The workflow contains duplicate/disabled nodes suggesting it's in development
- Hard-coded OpenAI API keys in some nodes (security risk)
- Limited to 6-digit mentor ID format
- Voice note processing may have file size/format limitations
- No explicit rate limiting or spam protection
Related Workflows¶
No related workflows are mentioned in the provided context.
Setup Instructions¶
- Import Workflow: Import the JSON into your n8n instance
- Configure Credentials:
- Set up Twilio credentials with Account SID and Auth Token
- Add OpenAI API credentials
- Configure Google Service Account for Sheets access
- Update Webhook URL: Replace the webhook ID in the WhatsApp Webhook node
- Configure Google Sheets: Ensure access to the mentor database spreadsheet
- Test Integration: Send a test message to verify the WhatsApp connection
- Security Review: Replace any hard-coded API keys with proper credential references
- Enable Workflow: Activate the workflow to start receiving messages
Note: This workflow appears to be a development copy with some disabled nodes. Review and clean up unused nodes before production deployment.