Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI WhatsApp Auto Reply Bot

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 Only

This 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.



🎥 Demo Video

Watch the complete project demonstration on YouTube:

Watch the Demo


✨ Features

  • 📋 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

🛠️ Tech Stack

  • Python
  • PyAutoGUI
  • Pyperclip
  • OpenAI API
  • python-dotenv

📂 Project Structure

AI-WhatsApp-AutoReply/
│
├── main.py
├── .env.example
├── requirements.txt
├── README.md
├── .gitignore
└── screenshots/
    ├── demo1.png
    ├── demo2.png
    └── workflow.png

⚙️ Installation

Clone the repository:

git clone https://github.com/your-username/AI-WhatsApp-AutoReply.git

Move into the project directory:

cd AI-WhatsApp-AutoReply

Install dependencies:

pip install -r requirements.txt

Create a .env file:

OPENAI_API_KEY=your_api_key_here

Run the project:

python main.py

🔄 How It Works

  1. Opens the WhatsApp chat.
  2. Selects and copies the conversation.
  3. Reads the copied chat from the clipboard.
  4. Checks whether the latest message is from the target contact.
  5. Sends the conversation to OpenAI GPT.
  6. Receives an AI-generated reply.
  7. Pastes the reply into WhatsApp.
  8. Automatically presses Enter to send it.

📸 Screenshots

AI Reply AI Reply AI Reply


🎥 Demo Video

Watch the complete project demonstration on YouTube:

🔗 https://youtube.com/your-video-link**


📦 Requirements

openai
pyautogui
pyperclip
python-dotenv

or

pip install -r requirements.txt

🚀 Future Improvements

  • Multi-contact support
  • Custom AI personalities
  • GUI application
  • Message scheduling
  • Logging system
  • Voice command support
  • Image and document handling

⚠️ Disclaimer

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.


👨‍💻 Author

Shailesh Maddhesiya

If you found this project useful, consider giving it a ⭐ on GitHub.

About

AI-powered WhatsApp Auto-Reply Bot built with Python, PyAutoGUI, and the OpenAI API that reads chat messages from the screen, generates contextual responses, and automatically sends replies.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages