Integrate WhatsApp Bot with Gemini API. This project is a simple WhatsApp bot that can interact with the Gemini API. This project is built using Node.js and whiskeysockets/baileys library.
😄 Actually this is not a meaningful project, it's just that I was bored and wanted to make a bot on whatsapp. So, I made this project.
- Node.js v18+
- Create API Key on aistudio
- Clone this repository
git clone https://github.com/ferdyhape/Whatsapp-Bot-Gemini-Baileys.git
- Go to the project directory and install the dependencies
cd Whatsapp-Bot-Gemini-Baileys npm install
- Copy
.env.example
to.env
and paste your API Key toGEMINI_API_KEY
cp .env.example .env
GEMINI_API_KEY = "YOUR_API_KEY"
- Run the project
npm start
- Open your browser and go to
http://localhost:8000/scan
to scan the QR Code with your WhatsApp app (this device will integrate with the bot) - After scanning the QR Code, your whatsapp bot is ready to use
- Send a message to your WhatsApp bot with a message that includes
/bot
to the WhatsApp that has been scanned previously with the QR Code, for example:hello /bot, how are you?
- Wait a moment, the bot will reply to your message.
- Enjoy!