Skip to content

mramirid/whatsapp-bot-covid

Repository files navigation

WhatsApp Bot COVID-19 Indonesia

A WhatsApp chatbot that provides COVID-19 statistics in Indonesia.

This bot utilizes Twilio Messaging Service to make itself available on WhatsApp. The messaging service is then integrated with the bot's backend. The backend handles the messages sent by users and generates responses for them. You can find the tutorial on how to create a backend for WhatsApp chatbot using NestJS and how to integrate it with Twilio in this article: Create a WhatsApp Bot to Discover Restaurants using Twilio and Node.js.

This project is now in version 2. We have removed the feature to search COVID-19 statistics at provincial level, because we could not find any API that provides such data. The first version can be found in the V1 - The Legacy Codebase release.

Screenshots

Hallo & Help Get Statistics
Landing Page Property Details

Sequence Diagram

Running the Bot

  1. Install the dependencies
npm ci
  1. Run the backend. Ensure port 3000 is available to use.
npm start
  1. Run ngrok. We need to run it in order to expose the backend to the internet, so then Twilio can connect to it.
npx ngrok 3000

You might not need to do step 3 if you are deploying the backend onto a hosting provider.

  1. Integrate the backend with Twilio. For detailed instructions on how to do it, please refer to this article Create a WhatsApp Bot to Discover Restaurants using Twilio and Node.js.