# WhatsApp Node JS Bot

On [GitHub](https://github.com/stars/Whapi-Cloud/lists/node-js-bot-samples-scripts) you can find an implementation of a simple WhatsApp chatbot that demonstrates the basic functionality of sending and receiving messages of different types and working with groups.&#x20;

{% hint style="info" %}
Using this source code will allow you to customize the bot to your needs or take it as a basis for creating any other integration.&#x20;
{% endhint %}

## Bot's source code

#### Choose Your Bot Script

We offer two options for bot scripts:

1. **Basic Version (for Beginners)**\
   This version is ideal if you're just starting with bot development. The bot responds to commands with text messages and image sharing, allowing you to focus on the core functionality without being overwhelmed by unnecessary features.

{% embed url="<https://github.com/Whapi-Cloud/whatsapp-simple-node-js-bot>" %}

{% embed url="<https://youtu.be/bxwlAMm6B5U>" %}
Setting up and testing a simple bot with GitHub
{% endembed %}

***

2. **Advanced Version (for Experienced Users)**\
   This script comes with more capabilities, such as sending not just text messages but also videos, files, creating groups, and more. The code is more optimized and efficient, but it may not be as straightforward for beginners.

{% embed url="<https://github.com/Whapi-Cloud/nodejs-whatsapp-chatbot>" %}

{% hint style="success" %}
**Step-by-step instructions on how to set up and run this chatbot:** <https://whapi.cloud/setting-up-chatbot-whatsapp-nodejs>&#x20;

*We'll talk in detail about how to test the bot on a local, which servers to use, some tips and the main causes of popular failures.*
{% endhint %}

If you need help, contact us in the live support chat on any dashboard page, or email <care@whapi.cloud>. We will definitely help you!

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.whapi.cloud/help-desk/source-code/whatsapp-chatbot/whatsapp-node-js-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
