Quick overview
This workflow receives appointment requests via webhook, checks slot availability, then creates/updates a contact and books a 30-minute appointment in GoHighLevel (HighLevel). It also creates or updates a related opportunity with custom fields and triggers follow-up sub-workflows for background processing and error handling.
How it works
- Receives a POST webhook request with the patient’s name, phone, address, service type, and preferred date/time.
- Calls a separate n8n workflow to check whether the requested time slot is available.
- If the slot is unavailable, returns a response indicating the appointment was not booked and the slot is unavailable.
- If the slot is available, builds a 30-minute start/end time window from the preferred date/time and creates or updates the contact in GoHighLevel.
- Books the appointment in the specified GoHighLevel calendar and then searches the GoHighLevel pipeline for an existing opportunity matching the contact/phone.
- Updates the existing opportunity stage or creates a new opportunity, then uses the LeadConnector/GoHighLevel API to set custom fields (service type, preferred date/time, and event ID).
- Returns a “booked” response payload and triggers a separate background workflow with the booking details, while routing any GoHighLevel failures to an error workflow.
Setup
- Add GoHighLevel (HighLevel) OAuth2 credentials for the contact, calendar appointment, and opportunity actions.
- Add a GoHighLevel/LeadConnector private integration bearer token for the HTTP request that updates opportunity custom fields.
- Update the GoHighLevel location ID, calendar ID, pipeline ID, stage ID, and custom field IDs to match your GoHighLevel account.
- Publish and configure the dependent sub-workflows (“Ray - Check Slot Availability”, “Ray - Background Workflow”, and “Ray - Error Workflow”) and ensure their workflow IDs are correct.
- Copy the webhook URL for
POST /ray/book-appointment and configure the calling system to send the required request body fields.