Help integrating GoHighLevel Conversations API in n8n – always 404/401 despite correct token & endpoints

Hi everyone,

I’m trying to build an n8n workflow that takes an incoming webhook (contactId, locationId, AI-generated reply) and then:

  1. Create a new conversation in GoHighLevel
  2. Send an SMS reply into that conversation

I have:

  • n8n Cloud v1.90.2 (node n8n-nodes-base.httpRequest v4.2)
  • A GoHighLevel sub-account with Private Integration (API v2.0) token (pit-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
  • A valid locationId (qXE4pqpNUNLSkOHVRUTC) and contactId (IAHblqJsclGSVcnfocBG)

What I’ve tried

1) HTTP Request node, Generic Header Auth

  • Credential: Generic → Header Auth → Header name GHL-Private-Integration, value pit-…
  • Headers (toggled Send Headers on):
    • Accept: application/json
    • GHL-Private-Integration: pit-…
    • Version: 2021-07-28
  • Body (Using Fields Below):

json

CopyEdit

{
  "contactId": "IAHblqJsclGSVcnfocBG",
  "locationId": "qXE4pqpNUNLSkOHVRUTC",
  "channel": "SMS"
}
  • URL variations tried:
    • POST https://services.leadconnectorhq.com/v2/conversations
    • POST https://rest.gohighlevel.com/v1/conversations
    • POST https://api.gohighlevel.com/v2/conversations

→ Always returns 404 Not Found ({"msg":"Not found"}) or 401 (No Authorization header found / Version header is invalid)

2) Send message node – same auth + headers

  • URL: POST https://services.leadconnectorhq.com/v2/conversations/{{ $json["id"] }}/messages
  • Body:

json

CopyEdit

{
  "content": "Sure—what service, date & time would you like?",
  "type": "SMS"
}

→ Also 404 / 401

3) OAuth2

  • Tried configuring HighLevel OAuth2 credential in n8n – but I cannot find client_id/client_secret in the Private Integration UI; scopes for conversations/messages don’t match docs.

4) n8n Code node

  • Wrote custom JS using this.helpers.request() and $http.request()
  • Always errors out this.helpers.request is not a function or $http is not defined

5) cURL Import

  • Copied the exact cURL from GHL docs into Import cURL → still mis‐mapped headers or URL, same 404/401

What I need

A minimal working example of how to:

  1. Authenticate against GHL’s Conversations API from n8n
  2. Create a conversation for a given contactId & locationId
  3. Post an SMS message into it

Even a small n8n workflow export I can import would be hugely helpful. I know the token and IDs are correct (I can see them working in Postman), so I believe I’m missing one tiny detail in n8n’s HTTP Request settings.

Thank you in advance for any ideas or examples!

1 Like

pretty sure GHL is Oauth2, so use the built in module and credential type, if you need to do an API call that is not apart of GHL module, use HTTP request and use the predefined credential type for GHL/HL

Here are some example nodes I use for creating email conversations in ghl you can use as a guide, don’t mind the node title inbound it’s actually an outbound in the body! :slight_smile:

1 Like

This is setup with a private integration, you can see the node uses Bearer Pit- etc

Did not require GHL marketplace app

1 Like