GoHighLevel (GHL)

Sit an AI Agent behind any communication channel in GHL to auto talk with customers.

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.

Here are the steps to integrating A.I. with GHL:

1. Create a new workflow in GHL

After naming and saving this new workflow, go into the Settings tab.

Turn on the option for "Allow re-entry" and click Save.

2. Add a New Trigger

Customer Replied - Select the reply channel you want the A.I. Agent to be on. In this example we are using Facebook Messenger.

3. Add First Action Step - Custom Webhook

Select the option "Custom Webhook"

4. Change Event Type to POST

Under the option "EVENT", click the dropdown menu and select "POST". The structure of the window should change to look like the image below.

5. Copy/Paste Your URL (API Endpoint)

Inside your white labeled version of the Stammer dashboard, navigate to your white label API documentation.

Dashboard > Account > API > Explore API Documentation > Message Chatbot

(It will say your agency's name instead of "SR Chatbot")

Copy your URL (under API Endpoint) into your clipboard.

6. Paste URL in GHL

Paste your url into GHL - it should look like this but instead of saying app.srchatbot.com, it will say your custom domain.

7. Add Item to Headers

Click the "Add Item" button under Headers.

Two new boxes will appear, Key and Value.

Key = Type in the word "Authorization"

Value = Type in the word "Token"

8. Copy API Token

Dashboard > Account > API > API Token > Copy Button

This will copy your private API Token to your clipboard.

Keep this value private. You can always re-generate this token, but if you do you must update any automations using the token.

9. Paste in API Token

Inside GHL after the word "Token", paste in your API Token.

Be sure there is a single space between the word "Token" and your API Token.

Example: Token 2345wgj3894v3g49g8

10. Add 3 Items to Body

Under the header "Body (Key and Value)" click "Add Item" 3 times.

This will add 3 new rows. In each row there will be two new boxes, Key and Value.

  • In the first row under Key type in "chatbot_uuid"

    • This is the unique identifier for the A.I. Agent you want to connect to.

  • In the second row under Key type in "query"

    • This is the message sent from the user that the A.I. Agent will respond to.

  • In the third row under Key type in "user_key"

    • This is the unique identifier for each user so the A.I Agent knows who it's talking to.

11. Adding chatbot_uuid

This is the unique identifier for the A.I. Agent you want to connect to.

Inside your white labeled version of Stammer go to the dashboard of the chatbot and in the right hand side dropdown menus there is an option called "Chatbot UUID".

Open ChatBot UUID and copy the value.

Paste the Chatbot UUID into the corresponding Value box.

It should now look similar to the image below.

12. Adding Query

This will be a custom value from GHL that pulls in the user's message dynamically.

{{message.body}}

For establishing the connection with the A.I. Agent we need to add in a test message/ query.

*For this first establishing replace {{message.body}} with a sample message like "Hey there". We will be utilizing this further in Step 15.

13. Adding User Key

This is the unique identifier for each user so the A.I Agent knows who it's talking to.

This is also a custom value from GHL that will show a unique value for each contact (even if you don't have their email or phone number).

{{contact.id}}

14. Establishing Connection with A.I.

After adding in all of the information we need to establish a connection with this GHL workflow and your A.I. agent inside your white labeled version of Stammer.

  1. Click the checkbox next to "Save response from this Webhook"

  2. Search for any contact (I like to add myself as a contact and then search for myself)

  3. Select a contact by clicking the checkbox next to a name

  4. Click "Send Test Request"

15. Saving the Connection

If everything works correctly you should see a "Green Status 200" Banner.

This means you have a successful connection with your A.I. Agent.

In this example, the test message we sent to the A.I. Agent was "Hey there".

In the image below you can see the A.I. agent's response under Answer which reads "Hello! How can I assist you today?"

You can now click the blue button "Save Action".

Now click the blue button "Save" to save your work on this entire workflow in GHL.

After saving, click back into the custom webhook action.

We need to change the value of Query to go form "Hey there" to {{message.body}}.

Then click Save Action.

16. Adding the Final Step

Now that we've established the connection between GHL and the A.I. Agent in your white labeled version of Stammer, we need GHL to send the response to the user.

Click the plus button in the workflow builder.

Seach for the channel you want to respond back to. In this tutorial we are using Facebook Messenger so I am selecting Messenger.

You can select whichever channel you want to respond to, just make sure it matches with the channel you setup the trigger with at the start of this workflow.

The message from the A.I. agent will be different every time.

So we need to select the value from the dropdown in custom values which should look similar to the image below.

Custom Values > Custom Webhook > (Name of your First Action Step) > Response > Data > Answer

Click Save Action.

Save the workflow.

Publish the workflow so it's live.

17. Testing Live

That's it! You're done. You can now test the A.I. Agent live on the channel you setup.


Want to know how to send collected information to GHL?

Sending Lead Data to GHL

Last updated