← Retour aux projets
Ghl N8n Bridge
#ghl-n8n-app (GHL Token Broker)
This is the GoHighLevel (GHL) Token Broker Backend, designed to integrate securely with the n8n-nodes-ghl-bridge community node.
Built and maintained by Zeon Studio.
#Why this exists?
When building a public Marketplace App for GoHighLevel, you must use OAuth 2.0. Managing these rapid-expiring OAuth tokens directly inside n8n leads to race conditions and invalid tokens.
This Next.js backend serves as a highly-available middleware that:
- Handles the OAuth 2.0 handshake (
/api/v1/oauth/callback). - Stores and encrypts tokens in Supabase.
- Provides an API endpoint for the n8n Action node to seamlessly retrieve short-lived access tokens via
pg_try_advisory_xact_lockto prevent race conditions during refresh. - Provides a secure webhook receiver (
/api/v1/webhooks/trigger) that validates GHL HMAC signatures and queues events in Supabase for n8n to retrieve securely.
#Tech Stack
- Next.js 16 (App Router)
- Supabase (PostgreSQL + RLS)
- Upstash Redis (Optional - for Rate Limiting)
- Vercel (Recommended Deployment)
#Quick Start
- Set up a Supabase project and run the provided SQL migration script (found in
setup-guide.md). - Copy
.env.exampleto.env.localand fill in your GHL App credentials and Supabase keys. - Run the development server:
npm install npm run dev
- Set up a cron job (via Vercel Cron or similar) to hit
GET /api/cron/dispatch-webhooksevery minute.
#License
MIT License © 2026 Zeon Studio