Go High Level - Add an appointment into a calendar

Follow

1 - Create a new delivery
2 - Select a trigger
3 - Select "Direct Post" as an action
4 - Select "JSON Post" as a remote system
5 - The URL required to insert appointments is https://rest.gohighlevel.com/v1/appointments/ add this to the "URL" text box.
6 - Next you will need to add the JSON payload into the "Payload builder". Copy the below code block and paste it into the "Payload builder".

{
"firstName": "[firstname]",
"lastName": "[lastname]",
"phone": "[phone1]",
"selectedSlot": "2021-08-21T15:00:00-04:00",
"selectedTimezone": "America/New_York",
"calendarId": "[CALENDAR ID FOR THE SPECIFIC CALENDAR HERE]",
"customField": {
"extrafield": "ExtraTest"
}
}


Important information on fields

selectedSlot - You will need to create a custom field in LB to capture this time/date. Usually, you would select the data type as "Date/time". However, due to the way GHL need this passing into their system, you will leave this as "None". 
LeadByte_-_Campaign_Fields_2022-03-25_at_10.04.11_am.jpg

GHL webhook will pass the calendar start date/time into LeadByte like this:

"calendar_startTime": "2022-02-18T10:00:00",

However, to pass this back into a subaccount it needs to include the timezone. Example with timezone:

"calendar_startTime": "2022-02-18T10:00:00+01:00",

Due to this, you will need to add a static value to the "selectedslot" field. 

 "selectedSlot": "[Time_slot]+01:00",

The format must be YYYY-MM-DDTHH:MM:SS


selectedTimezone -
Make sure this matches what you have in your GHL account. Below is an example when selecting Europe/London taken from GHL.

 "selectedTimezone": "Europe/London",


calendarId - Can be taken from your calendar settings
IPNET_2022-03-25_at_10.26.40_am.jpg

7 - Add your Authorization token as a header. You will find your API Key under Settings > Business Info. Make sure you add the work Bearer before the key as shown below.

LeadByte_-_Edit_2022-03-25_at_10.32.57_am.jpg

8 - Add success response code as 200 under "Remote System Response" like shown below"

LeadByte_-_Edit_2022-03-25_at_10.37.18_am.jpg


9 - Test the connection. It's VERY important you test the delivery and get a successful response from GHL. Do this by selecting TEST at the bottom of the page. You will need to get a successful response before you can enable the delivery.

FAQ
- I need to add a contact to GHL, how do I do that? 
You can find how to add a contact in the following article -  How to add a contact to GHL 

There is a slight variation to the information in the add contact article if you only want to add a contact only if an appointment has been successfully booked. 

The "Action" for the add contact delivery will need to be "Manually / via code"
LeadByte_-_Edit_2022-05-06_at_9.53.44_am.jpg 

Once this delivery has been created go back to the Appointment Booking delivery > scroll down to the section called "Remote System Response" and tick the box that says "On Success, trigger delivery" then select the add contact delivery you just created.

Again, make sure you test the delivery before going live.



More information here https://developers.gohighlevel.com

Was this article helpful?
0 out of 0 found this helpful

Comments