Skip to content

About

Real-Time Autonomous AI Lead Intent Classification & Emergency Dispatch Middleware for GoHighLevel (GHL) API v2. Intercepts inbound leads, scores urgency (P0/P1/P2), applies dynamic CRM tags/notes, and triggers outbound SMS escalations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

GHL AI Lead Dispatch & Emergency Escalation Engine ⚡🤖

GoHighLevel API v2 FastAPI Python License

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.


🎬 Video Demo & Walkthrough

📹 Click here to watch the full Video Demo & Screen Recording


🌟 Why This Architecture?

Standard GHL automation workflows rely on static triggers and manual tag assignments. This engine introduces an AI-driven decision layer that:

  1. 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).
  2. 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.
  3. Resilient OAuth2 Token Handler: Automatic token refresh mechanism for seamless, uninterrupted API v2 background operations.

🏗️ System Architecture

                                  +------------------------------------+
                                  |  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     |
                       +----------------+   +---------------+   +-------------------+

⚡ Features & Capabilities

  • 🚨 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.

Automatic GoHighLevel CRM Sync (Notes & Tags)

image image

🛠️ Built With


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Real-Time Autonomous AI Lead Intent Classification & Emergency Dispatch Middleware for GoHighLevel (GHL) API v2. Intercepts inbound leads, scores urgency (P0/P1/P2), applies dynamic CRM tags/notes, and triggers outbound SMS escalations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages