# GoHighLevel (GHL)

Integrating an AI Agent with your client's GHL account is one of the most powerful ways to get up and running really quickly.

This is useful because you can utilize the existing communication channels that the client has already setup and use GHL's automation builder to create unique scenarios where an A.I. Agent can take over the conversation.

1. **Create a New Workflow in GoHighLevel (GHL)**
   * Navigate to **Automations > Workflows** in your GHL dashboard.
   * Click on **Create New Workflow**, give it a name, and save it.
   * Enable **Allow re-entry** in the **Settings** tab to allow multiple interactions.
2. **Add a Trigger**
   * Click on **Add Trigger** and choose **Customer Replied**.
   * Select the communication channel where Agent Supply’s AI will respond (e.g., SMS, Facebook Messenger).
3. **Set Up a Custom Webhook Action**
   * Click on **+ Add Action** and select **Webhook**.
   * Set the **Event Type** to **POST**.
   * In the **URL** field, enter your **Agent Supply API endpoint** (replace the Agent Supply endpoint).
     * Example: `https://api.agentsupply.ai/v1/messages`
4. **Configure Headers**
   * Add a header with:
     * **Key**: `Authorization`
     * **Value**: `Token YOUR_AGENT_SUPPLY_API_TOKEN`
       * Replace `YOUR_AGENT_SUPPLY_API_TOKEN` with your Agent Supply API token.
5. **Set Up the Request Body**
   * Use the following parameters:
     * **chatbot\_uuid**: Unique identifier for your Agent Supply bot (replaceAgent Supply\`s `chatbot_uuid`).
     * **query**: Use GHL variable `{{message.body}}` to capture the user's message.
     * **user\_key**: Use `{{contact.id}}` to identify the user.
6. **Test the Integration**
   * Click **Save Action** and then **Save Workflow**.
   * Test the webhook by sending a message to see if Agent Supply correctly responds.
7. **Finalize Workflow**
   * After successful testing, adjust the parameters as needed (for instance, replace `{{message.body}}` if Agent Supply requires different formatting for the user’s message).
   * Save your workflow changes.

#### 📌 Notes:

* **Replace Agent Supply Tokens and API URLs**: Be sure that any specific references to Agent Supply (like API URLs and tokens) are replaced with those for Agent Supply.
* **Adapt Response Format**: The response format from Agent Supply might differ from Agent Supply Review Agent Supply’s API documentation to ensure you're handling responses correctly.

#### 🚀 Test Your Workflow

After making these adjustments, test the workflow by simulating conversations through your GHL platform. Make sure that Agent Supply responds as expected.

***

Want to know how to send collected information to GHL?

[Sending Lead Data to GHL](/ai-features/leads-legacy/sending-lead-data-to-ghl.md)[<br>](https://docs.stammer.ai/stammer.ai-docs/ai-features/integrations/zapier-app)


---

# 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://docs.agentsupply.ai/ai-features/integrations/gohighlevel-ghl.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.
