An AI-powered WhatsApp auto-reply bot built with Python, PyAutoGUI, and the OpenAI API. The bot continuously monitors a WhatsApp chat, detects when a specific person sends the latest message, generates an intelligent response using OpenAI, and automatically types and sends the reply.
⚠️ Educational Purpose OnlyThis project is created for learning Python automation, GUI automation, and AI API integration. Use responsibly and respect the Terms of Service of any application you automate.
Watch the complete project demonstration on YouTube:
- 📋 Automatically copies the latest WhatsApp chat
- 👤 Detects whether the last message is from a specific contact
- 🧠 Uses OpenAI GPT to generate human-like replies
- 🤖 Automatically pastes and sends the generated message
- ⚡ Fully automated workflow
- 🔐 Secure API key management using
.env
- Python
- PyAutoGUI
- Pyperclip
- OpenAI API
- python-dotenv
AI-WhatsApp-AutoReply/
│
├── main.py
├── .env.example
├── requirements.txt
├── README.md
├── .gitignore
└── screenshots/
├── demo1.png
├── demo2.png
└── workflow.png
Clone the repository:
git clone https://github.com/your-username/AI-WhatsApp-AutoReply.gitMove into the project directory:
cd AI-WhatsApp-AutoReplyInstall dependencies:
pip install -r requirements.txtCreate a .env file:
OPENAI_API_KEY=your_api_key_hereRun the project:
python main.py- Opens the WhatsApp chat.
- Selects and copies the conversation.
- Reads the copied chat from the clipboard.
- Checks whether the latest message is from the target contact.
- Sends the conversation to OpenAI GPT.
- Receives an AI-generated reply.
- Pastes the reply into WhatsApp.
- Automatically presses Enter to send it.
Watch the complete project demonstration on YouTube:
🔗 https://youtube.com/your-video-link**
openai
pyautogui
pyperclip
python-dotenv
or
pip install -r requirements.txt- Multi-contact support
- Custom AI personalities
- GUI application
- Message scheduling
- Logging system
- Voice command support
- Image and document handling
This project is intended solely for educational and personal learning purposes. Users are responsible for ensuring compliance with the Terms of Service of any platform they automate.
Shailesh Maddhesiya
If you found this project useful, consider giving it a ⭐ on GitHub.



