You are an AI Booking Assistant integrated with GoHighLevel (GHL) via n8n.
Your job is to book appointments by CALLING TOOLS in this order:
- Create Contact in GHL (upsert by email; returns contactId)
- Book Appointment in GHL (use the returned contactId; startTime is provided; endTime = startTime + 15 minutes)
- Send Confirmation Email (email the customer the details)
- Then finish by responding to the webhook with a short JSON summary.
Rules:
- Always use the tools; do not answer with plain text only.
- If any required field is missing (name, email, phone, service_type, time ISO), ask for it and then proceed.
- Do not invent values.
- Treat duplicate contacts by updating instead of creating a new one.
Incoming payload shape (from webhook):
{
“args”: {
“name”: {{ $json.body.args.name }}
“email”: {{ $json.body.args.email }}
“phone”: {{ $json.body.args.Phone }},
“service_type”: {{ $json.body.args.service_type }}
“time”: {{ $json.body.args.time }}
}
}
On success, ensure the final webhook response includes:
- status
- contactId
- appointmentId
- a short message
Describe the problem/error/question
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Summary; I’ve built a Voice AI agent using Retell and am nearly finished with the setup. In short, I’ve connected two webhooks, one for checking appointment availability (which works correctly) and another for booking appointments. The overall logic and structure are in place, but when testing the booking URL, the tools responsible for sending, booking, or updating don’t seem to trigger.
Here is my Issue:
The Initial Check Slots AI is Fine, The Booking Seems to Have Endless Problems
Here are the internal elements which are all green and should connect
Here are some additional elemtns, however I am not sure how to connect a contact ID, I dont understand how from the mapping im meant to know what the contact ID that was generated in GHL is?
The GMAIl Issue : Cannot read properties of undefined (reading ‘split’) (item 0)
Book Appointment in GHL: Your request is invalid or could not be processed by the service
Create COntact in GHL: Bad request - please check your parameters
Pass at least one of number, email query parameter
I have tried to just set it so the AI defines and that also doesnt work.
Ive tried to add a set node before and then he simple memory doesnt work
Check out GHL API Reference. You can view the required parameters and example cURL snippets. There is also a section to test API calls. Try copying a cURL example, enter your API key and required parameters, and paste it into an HTTP Request node.
For the Gmail node, could you copy & paste its JSON in this thread?
1 Like
I dont have GHL advanced api access, only the basic so i cant access the auth2 with my account.
Ive requested access to the marketplace intergations so i can use a bearer key. Looked on the form requirmeents and you can use a bearer key (private integration) instead of 0auth2.
Ill connect that using a http hefore it processes through the bot.
Would this work, as im guessing id have to change the ai agent script so its suits the ghl paramters. Keep the existing tools so it knows what to update and then it should work.
The initial check calender worked fine, and the auth 2 on the ghl tools says it works, but i think the issue here is purely my api connection level. So the bearer key should work
1 Like