> For the complete documentation index, see [llms.txt](https://helpdocumentation.gitbook.io/user-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdocumentation.gitbook.io/user-documentation/ai-dashboard/create-a-basic-ai-chatbot-on-whatsapp-which-replies-on-our-data.md).

# Create a Basic AI Chatbot on WhatsApp which replies on our data

### Step 1: Start in the Bot Builder

* Access the bot builder and create a new bot.​

### Step 2: Configure Trigger and Conditions

* Set the trigger for the bot (e.g., hot keyword).​
* Define the channel (e.g., WhatsApp) and the necessary conditions for activation.​

### Step 3: Set Up the User Query Step

* Add a step to ask the user, “What is your query?”.​
* The next step should capture the user’s response to pass to the trained AI.​

### Step 4: Connect to Trained AI

* In the builder, create a new AI integration.​
* Go to your AI dashboard, copy the authentication token, and paste it into the bot builder.​
* After adding authentication, select the AI agent you want to use (e.g., Support Agent).​
* Choose all relevant files or leave the selection empty to use all agent files for response generation.​

### Step 5: Customize System Prompts and Replies

* Optionally, add a system prompt for specific fallback replies if the AI cannot answer the user’s query.​
* Your bot flow can also include parameters like contact number, channel name, or user name for personalization.​

### Step 6: Mapping AI Answers

* Map the AI’s answer to a “send message” block.​
* If no answer is available, configure a fallback message or route the conversation to a human agent.​
* Use error handling to define fallback actions if the AI is unavailable.​

### Step 7: Continue the Conversation

* Set up an “AI smart wait” step (e.g., 5 minutes) to wait for additional user replies.​
* If the user responds, pass the new query back to the AI agent; otherwise, end the session politely.​
* Implement exit keywords (e.g., “bye”) to close the conversation with an appropriate message.​

### Step 8: Test and Refine

* Test your bot’s flow and edit steps as needed for smooth conversation and accurate answers.​

This process will result in a WhatsApp-based AI chatbot that can reply intelligently to user questions based on your documents and data, and escalate the conversation to a human if needed.​

## Bot Flow Template Clone Link

```
/products/bot/flow/fc173d9d770af2f3c754c429c8d894fc
```

{% embed url="<https://youtu.be/xcv6aWqZ4W8>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://helpdocumentation.gitbook.io/user-documentation/ai-dashboard/create-a-basic-ai-chatbot-on-whatsapp-which-replies-on-our-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
