# Qualify and book AI sales calls with GPT-4o-mini and LeadConnector CRM

> Quick Overview This workflow receives inbound lead messages from HighLevel (LeadConnector), pulls prior conversation history from Supabase/Postgres, uses OpenAI to generate a short reply, and updates HighLevel custom fields (qualification data, lead disposition, and appointments) including checking availability and booking or rescheduling. How it works 1. Receives an inbound message event from HighLevel (LeadConnector) via a webhook. 2. If the payload indicates an appointment was booked, it fetches the contact’s upcoming appointments from HighLevel and stores the matching appointment event ID back on the contact record. 3. If no appointment is indicated, it loads the lead’s previous chat history from Supabase, formats it into a readable transcript, and provides it as context to an OpenAI-powered conversational agent with Postgres chat memory. 4. The agent qualifies the lead and, when appropriate, updates HighLevel custom fields (business type, inquiry volume, response time, team size, 

- **Domain**: `n8n-workflow-15910.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/15910
- Page (HTML): https://agenstry.com/agents/n8n-workflow-15910.n8n.io
- Documentation: https://n8n.io/workflows/15910
