A Python-based SMS chatbot that leverages the TextBee.dev SMS Gateway and its webhook feature to receive and respond to SMS messages using Perplexity AI. The bot supports message history, sender whitelisting, and logging.
This project is now fully cloud-based — no need for GSM hardware or Raspberry Pi.
- ⚡️ Instantly responds to incoming SMS messages via webhook
- 💬 Supports message history per sender for contextual responses
- ✅ Sender whitelist (only authorized numbers can interact with the bot)
- 🧠 Uses Perplexity AI to generate intelligent replies
- 📝 Simple logging system to monitor activity
- 🛠️ Easy to configure and run with a
.env
file
This project is a prototype and should not be used in production without proper security and validation measures.
Note: The previous version using the SIM800L module and Raspberry Pi has been deprecated in favor of the TextBee.dev SMS Gateway.
- A user sends an SMS to your TextBee number.
- TextBee forwards the message to your hosted webhook.
- The webhook receives and processes the SMS.
- The chatbot queries Perplexity AI and generates a response.
- The response is sent back to the user via TextBee.
The bot logs the following information:
- Incoming phone numbers and messages
- Timestamps of interactions
- AI responses
All logs are stored in the local logs/
directory (one file per session or day depending on configuration).
This project is released under the MIT License.
You are free to use, modify, and distribute it.
Use this tool responsibly. SMS costs may apply depending on your TextBee plan. Make sure to comply with privacy laws and obtain consent before storing or processing users' phone numbers and messages.
- TextBee.dev – SMS Gateway provider
- Perplexity.ai – AI answering engine
- Project Repository