How it works

WAGHL exposes a webhook that bridges your GHL workflows with the ChatGPT API. When a customer sends a WhatsApp message, GHL triggers a workflow that calls our webhook with your ChatGPT credentials. ChatGPT generates a response — WAGHL delivers it on WhatsApp.

Customer
"What are your business hours?"
ChatGPT reply
"We're open Mon–Fri, 9am–6pm EST. Need to schedule something?"
Customer message → Workflow webhook → ChatGPT API → WhatsApp reply

Customer messages trigger a GHL workflow that calls the WAGHL webhook with your ChatGPT API key. The AI generates a reply, WAGHL sends it back on WhatsApp.

Setup steps

The video above walks through the complete setup. Here's the summary:

1

Create a new workflow in GHL

Open Automation → Workflows → Create Workflow, choose From Scratch.

2

Add the trigger

Add a Customer Replied trigger. Set the filter Reply Channel to SMS (since WAGHL routes WhatsApp through SMS). Save the trigger and enable Re-entry in workflow settings — that lets the same contact trigger the workflow on every reply.

3

Add a Webhook action

Add an action of type Webhook. Set the method to POST. Use the URL from the table below based on your gateway.

4

Add your ChatGPT credentials

In the webhook action's Custom Data section, add two keys: chat_gpt_assistant_id and chat_gpt_api_key with their values from your OpenAI account.

5

Save, name, publish

Save the action. Name the workflow (e.g. "ChatGPT Bot"). Publish it.

6

Test the bot

Send a WhatsApp message to your connected number. ChatGPT should reply within seconds.

Webhook URL by gateway

Webhook URLs differ based on your sub-account's WhatsApp Gateway. To find yours: Settings → Phone Numbers → Advanced Settings.

Provider Name Webhook URL
WhatsApp Gateway
https://trigger.apimerger.com/chatgpt-assistant
WhatsApp Gateway 1
https://trigger1.apimerger.com/chatgpt-assistant
WA1 Connector
https://wa1.apimerger.com/chatgpt-assistant
WA2 Connector
https://wa2.apimerger.com/chatgpt-assistant

Required custom data keys

Two required keys go in the webhook action's Custom Data:

💡
Required keys

chat_gpt_assistant_id — your ChatGPT assistant's unique ID (find it in your OpenAI dashboard)

chat_gpt_api_key — your OpenAI API key

Optional keys (advanced)

  • additional_instructions — extra system-level directives sent to ChatGPT for this conversation
  • thread_duration — how long ChatGPT retains conversation context, in days. Value of 1 = 1 day. Set to 0 to delete threads.
  • custom_message — override what's sent to ChatGPT (e.g. include a custom field in the prompt). Note: this replaces the customer's actual message, doesn't append to it.

Capture ChatGPT's last response

If you want to store ChatGPT's reply in the GHL contact for later workflows, create a custom field:

1

Open Settings → Custom Fields → Add Field

In your GHL sub-account, navigate to the custom fields settings.

2

Configure the field

Type: Multiline text. Field name: Chat Gpt Last Response (this exact name). Group: Contact. Save.

From now on, every ChatGPT response will be stored in this custom field on the contact, ready for use in other workflows or as a merge field.

⚠️
Common pitfalls

Wrong API key or assistant ID = silent failures. Double-check the values from your OpenAI dashboard. Also verify you're using the webhook URL that matches your sub-account's gateway.

Tips for efficiency

  • Keep your ChatGPT assistant ID and API key on hand from the OpenAI platform
  • Always create the Chat Gpt Last Response custom field if you want to track replies in GHL
  • Periodically check the captured responses to verify the integration is firing correctly
  • Test with multiple message types — short questions, long explanations — to make sure your assistant handles both well

What's next?

Need help with this? WhatsApp us at +1 347 308 7143 — quick replies guaranteed.
💬 Message us