A WhatsApp chatbot that integrates Fonnte API with Google's Gemini AI to provide intelligent responses to user messages.
- Intelligent responses powered by Google Gemini AI
- Conversation history tracking
- Command handling (/help, /reset)
- Easy deployment to Railway or other hosting platforms
- Node.js v16+
- Fonnte account with API key
- Google Gemini API key
-
Clone the repository: git clone https://github.com/yourusername/fonnte-gemini-whatsapp-bot.git cd fonnte-gemini-whatsapp-bot
-
Install dependencies: npm install
-
Create a
.envfile based on.env.example: cp .env.example .env -
Add your API keys to the
.envfile.
-
Start the server: npm start
-
Configure your Fonnte webhook to point to your server's URL: https://your-server-url.com/webhook
Collapse
- Test by sending a message to your WhatsApp number.
- Create a new project on Railway
- Connect your GitHub repository
- Add environment variables (FONNTE_API_KEY, GEMINI_API_KEY)
- Deploy
/help- Show help message/reset- Reset conversation history
- Webhook not receiving messages: Ensure your webhook URL is correctly set in Fonnte dashboard
- No response from bot: Check your API keys and server logs for errors
MIT