An intelligent, event-driven middleware and decision engine for GoHighLevel (GHL). It intercepts inbound lead messages, performs automated AI intent classification and urgency scoring, and executes real-time multi-channel escalations and CRM tagging via the GHL API v2.
📹 Click here to watch the full Video Demo & Screen Recording
Standard GHL automation workflows rely on static triggers and manual tag assignments. This engine introduces an AI-driven decision layer that:
- Evaluates Lead Sentiment & Intent in Real-Time: Instantly categorizes inbound leads (e.g., P0 Emergency Dispatch, P1 High-Value Sales Opportunity, or P2 Standard Inquiry).
- Dynamic GHL API v2 Synchronization:
- Automatically writes AI breakdown summaries into GHL Contact Notes.
- Applies workflow tags dynamically (
AI-Urgent,P0-Escalate,AI-HotLead). - Dispatches emergency SMS notifications or logs fallback dispatches directly into conversation threads.
- Resilient OAuth2 Token Handler: Automatic token refresh mechanism for seamless, uninterrupted API v2 background operations.
+------------------------------------+
| Inbound Lead (SMS / Form / Web) |
+------------------------------------+
|
v
+------------------------------------+
| FastAPI Middleware Engine |
| http://localhost:8000 |
+------------------------------------+
|
v
+------------------------------------+
| AI Classifier & Intent Router |
| - Urgency Score (1-100) |
| - Category & Priority Tagging |
+------------------------------------+
|
v
+------------------------------------+
| GHL API v2 Integrator |
+------------------------------------+
/ | \
v v v
+----------------+ +---------------+ +-------------------+
| POST /notes | | POST /tags | | POST /messages |
| Audit Log | | Dynamic Tags | | Emergency SMS |
+----------------+ +---------------+ +-------------------+
- 🚨 P0 Emergency Dispatcher: Detects critical keywords (e.g., pipe burst, flooding, no power) and triggers immediate priority escalation.
- 💰 P1 Sales Lead Router: Identifies high-intent buying signals (e.g., quote, pricing, schedule) and tags leads for rapid sales follow-up.
- 🏷️ Dynamic Tagging: Updates GHL contact records live with categorized priority tags.
- 📝 Structured Contact Notes: Appends detailed AI assessment summaries directly to GHL CRM contact records.
- 💬 Outbound Communication Gateway: Automatically triggers outbound SMS dispatches with a graceful fallback system.
- 🖥️ Interactive Control Panel: Built-in web dashboard and webhook simulator for real-time demonstration and testing.
- FastAPI - High-performance Python web framework
- GoHighLevel API v2 - CRM platform integration
- Jinja2 & Bootstrap 5 - Modern UI for real-time testing dashboard
- Python Requests - Robust HTTP client with OAuth2 auto-refresh
This project is licensed under the MIT License - see the LICENSE file for details.