This is a personal Whatsapp bot built using Twilio API in nodejs. The backend database used is postgreSQL.
/login
/save <note tag> <content aka whatever you wanna save>
/book <bookmark content or url or whatever>
/vnote <note tag>
/vbook
-
Head over to Twilio's website
-
Create an account and login if you haven't and configure your number with the Twilio whatsapp sandbox
-
Follow the instructions you find on the website
-
Now head over to Heroku to deploy the bot. Sign up if you haven't already and login
-
Create an application and add heroku-postgres as a resource
-
Run the following commands using the heroku cli to create the tables in the database
CREATE TABLE users (phone varchar not null); CREATE TABLE content (phone varchar not null, note varchar not null, message varchar); CREATE TABLE bookmarks (phone varchar not null, bookmark varchar);
-
Alright now your database is all set up and ready to start storing information
-
Deploying this server
-
Clone this repository
-
Create a .env file containing the following information
PORT=<a port number> SID=<The SID that you can get from Twilio dashboard> TOKEN=<The SID that you can get from Twilio dashboard> ENV=production PROD_URL=<The heroku-postgres url that you'll get from settings>
-
Push code to heroku using heroku cli or from Github itself
-
-
Test by sending any of the commands to the bot