Get Started in 10 Minutes
This quickstart guide will help you set up a fully functional WhatsApp bot with AI-powered responses in just a few steps.Prerequisites
Before you begin, make sure you have:- PHP 7.4 or higher installed
- MySQL 5.7+ database
- A WhatsApp Business API account
- An OpenAI API key
- Composer for dependency management
Step 1: Clone and Install
Step 2: Configure Environment
Create a.env file or configure config/config.php with your credentials:
config/config.php
See Configuration Guide for detailed setup instructions.
Step 3: Set Up WhatsApp Webhook
Expose your local server
For local development, use ngrok to expose your server:Copy the HTTPS URL provided (e.g.,
https://abc123.ngrok.io)Configure webhook in Meta
- Go to Meta Developer Console
- Navigate to your WhatsApp app > Configuration > Webhook
- Set callback URL:
https://your-domain.com/webhook - Set verify token: Match what you set in config
- Subscribe to
messageswebhook field
Step 4: Upload Knowledge Base
Upload documents to power your RAG system:- Extract text from PDF, DOCX, or TXT files
- Split into chunks for RAG processing
- Generate embeddings using OpenAI
- Store vectors in MySQL database
Step 5: Test Your Bot
Send a message to your WhatsApp number and watch your bot respond!Next Steps
Configure System Settings
Customize bot personality and behavior
Set Up Calendar
Enable appointment scheduling
Build Custom Flows
Create rule-based conversation flows
View API Reference
Explore the complete API documentation
Troubleshooting
Webhook verification fails
Webhook verification fails
- Ensure your verify token matches in both config and Meta console
- Check that your webhook URL is publicly accessible
- Verify SSL certificate is valid
Bot doesn't respond
Bot doesn't respond
- Check webhook logs in
logs/directory - Verify WhatsApp credentials are correct
- Ensure OpenAI API key has sufficient quota
- Test database connection
RAG responses are inaccurate
RAG responses are inaccurate
- Upload more relevant documents
- Adjust confidence threshold in settings
- Check document processing in database
vectorstable
Need more help?
Check the complete troubleshooting guide