Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mramirid/whatsapp-bot-covid
A WhatsApp chatbot that provides COVID-19 statistics in Indonesia.
https://github.com/mramirid/whatsapp-bot-covid
bot nestjs statistics twilio whatsapp
Last synced: about 14 hours ago
JSON representation
A WhatsApp chatbot that provides COVID-19 statistics in Indonesia.
- Host: GitHub
- URL: https://github.com/mramirid/whatsapp-bot-covid
- Owner: mramirid
- License: mit
- Created: 2020-05-16T08:17:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-09T08:29:11.000Z (7 months ago)
- Last Synced: 2024-07-09T10:55:28.066Z (7 months ago)
- Topics: bot, nestjs, statistics, twilio, whatsapp
- Language: TypeScript
- Homepage: http://jifosi.upnjatim.ac.id/index.php/jifosi/article/view/101
- Size: 8.66 MB
- Stars: 11
- Watchers: 4
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://www.twilio.com/blog/whatsapp-bot-discover-restaurants-twilio-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](https://github.com/mramirid/whatsapp-bot-covid/releases/tag/v1) release.
## Screenshots
| Hallo & Help | Get Statistics |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| | |## Sequence Diagram
[![](https://mermaid.ink/img/pako:eNqNVFtr2zAU_isHvSSFlMIe_VBI3Y71YW2JXcqKIRys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oyJQru76tj45AxzywpY5F_5Wh-ZixTJ8_D2unkoHIWOVPTitUVRzfcbSwq0Lfmivkr4l3r4fv0F346uAg)
## Running the Bot
1. Install the dependencies
```bash
npm ci
```2. Run the backend. Ensure port 3000 is available to use.
```bash
npm start
```3. Run ngrok. We need to run it in order to expose the backend to the internet, so then Twilio can connect to it.
```bash
npx ngrok 3000
```You might not need to do step 3 if you are deploying the backend onto a hosting provider.
4. 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](https://www.twilio.com/blog/whatsapp-bot-discover-restaurants-twilio-node-js).