Hey everyone, my partner Andrea and I build a WhatsApp bot which brings useful information about the people that is infected by Covid-19 in our country Colombia.
Dev.to Post that shows up the bot
The application uses the Twilio's WhatsApp API for sending information to the user based on a menu that we designed.
- Flask Web server
- MongoDB Database
- Web Scrapping
The usage is shown in the Dev.to post
- Docker or Flask for local dev
- A Twilio account - sign up
- A Twilio WhatsApp SandBox
- A MongoDB Free Tier at Atlas or Local
- Ngrok for local testing
After the above requirements have been met:
- Clone this repository and
cd
into it
git clone git@github.com:Jorgee97/CovidTwilio.git
cd CovidTwilio
- Create a virtualenv and activate
python3 -m venv .env
source .env/bin/activate
- Install dependencies
pip install -r requirements.txt
- Set environmental variables
export FLASK_APP=app
export FLASK_DEBUG=1
- Run the application
flask run
- Run ngrok to expose your api
./ngrok http 5000
- Add the ngrok Forwarding URL to your WhatsApp sandbox
That's it!
There is a Dockerfile attached to this repository that you can build and deploy wherever it fits best for your purposes. You can build your image using the Dockerfile like:
docker build -t covidtwilio:tag .
This project is Open Source and we are open for contributions 😄
No warranty expressed or implied. Software is as is.