# Building a WhatsApp Chatbot with WA List

{% embed url="<https://youtu.be/Zshk8W63dUg>" %}
Build a chatbot using List Feature
{% endembed %}

### **Webhook Parameters:-**

<mark style="color:green;">**`METHOD:`**</mark>**POST**

Webhook URLs may be different based on the WhatsApp Gateway you are using.\
\
To identify the correct webhook URL for your GHL sub-accounts, switch to the subaccount and go to&#x20;

#### **Settings- Phone Numbers - Advanced Settings**&#x20;

<table><thead><tr><th width="271">Name</th><th>URL</th></tr></thead><tbody><tr><td><strong>WA1 Connector</strong> </td><td><code>https://wa1.apimerger.com/list-send</code></td></tr><tr><td><strong>WA2 Connector</strong> </td><td><code>https://wa2.apimerger.com/list-send</code></td></tr><tr><td><strong>WhatsApp Gateway 1</strong></td><td><code>https://trigger1.apimerger.com/list-send</code></td></tr></tbody></table>

#### **Custom Data Keys**

| Custom Data | Value                                            |
| ----------- | ------------------------------------------------ |
| keyword     | <p>Keyword name of your existing </p><p>list</p> |

### Overview:

* Demonstrates how to create a chatbot using the list and GHL workflow automation feature.
* Shows how to automate the process of displaying a menu list when a specific trigger message is received.
* Utilizes the GHL workflow with triggers and actions to customize the chatbot responses.

### Assumptions:

* Assumes familiarity with GHL workflow automation.
* Assumes access to the GHL platform for setting up triggers, conditions, and webhooks.

### SOP: Creating a Chatbot using List and GHL Workflow Automation

#### Objective:

To create a chatbot using the list feature and GHL workflow automation in order to automate responses and provide a seamless user experience.

#### Key Steps:

1. **Open Workflow Automation:**
   * Access the GHL and open the workflow automation feature.
2. **Set Trigger:**
   * Add a trigger for customer reply.
   * Select the reply channel as SMS.
3. **Add Conditions:**
   * Utilize the if-else conditions to set up specific triggers based on user input.
   * For example, if the incoming message is "hi, test," set up a condition for that specific message.
4. **Create Webhook:**
   * Add a webhook to trigger the desired response.
   * Name the webhook (e.g., main menu).
   * Input the correct URL obtained from the help portal.
   * Define custom data with the keyword "menu" to specify which menu to display.
5. **Save and Publish Workflow:**
   * <mark style="color:red;">**Ensure to save and publish the workflow to activate the changes.**</mark>
6. **Test Chatbot:**
   * Send the specified trigger message (e.g., "hi") to test if the chatbot responds with the correct menu.
7. **Set Up Additional Responses:**
   * Create conditions for other triggers (e.g., "free trial," "technical support") to provide specific responses.
   * Customize messages for each trigger response.
8. **Test Additional Responses:**
   * Send the trigger messages (e.g., "free trial," "subscription") to verify if the chatbot responds accurately.

#### Cautionary Notes:

* Ensure to input the correct URLs and keywords to avoid errors in triggering responses.
* Double-check the spelling and formatting of trigger messages and responses to prevent malfunctions.

#### Tips for Efficiency:

* Copy and paste values to avoid spelling mistakes or formatting errors.
* Test the chatbot with different trigger messages to ensure smooth functionality.
* Monitor conversations and responses to make necessary adjustments for a better user experience.
