Claude Templates / B-tier · Situational
Outreach
The GoHighLevel Integration Playbook
OAuth, tokens, publishing and webhooks: the GHL API gotchas up front.
GHL-INTEGRATION-PLAYBOOK.md · 16 sections · 2,182 words · 17 KB · markdown
By Moe Ameen, founder of BILT · Published · Updated
The GoHighLevel Integration Playbook connects an app to the GoHighLevel API. It covers OAuth for marketplace installs and Private Integration Tokens for owners, says not to use the legacy v1 API key, and documents four gotchas: the userId requirement on social posts, a destructive sync of board IDs, media items needing MIME types, and the instagramPostDetails field name. It also covers blog publishing, CRM sync and webhooks.
Key takeaways
- Two auth paths: OAuth installs or a pasted Private Integration Token.
- Don't use the legacy v1 API key.
- Four documented gotchas that cause 4xx loops.
- Scopes should be narrowed per app.
Wiring an app to GoHighLevel without rediscovering every API quirk yourself. Token handling and refresh, contact upsert semantics, social and blog publishing, optional CRM sync, and the specific fields the docs don't tell you are required.
What does the GoHighLevel Integration Playbook build?
It builds install and callback routes or a token-paste screen, platform_connections rows with token refresh, publishing wrappers for social and blog, and an optional /api/webhooks/ghl receiver.
Most of its value is in the gotcha sections, written from failed API calls.
When should you use it?
Use it when your app reads from or writes to GoHighLevel: posting social or blog content, syncing contacts, or receiving GHL webhooks.
If you only need a one-way Zapier hop, the full integration is more than you need.
What do you need first?
You need App Infrastructure, plus marketplace client ID, secret and redirect URI if you use OAuth.
List the scopes your app actually needs; the file suggests a starting set to narrow.
What's inside
What does the playbook give you?
- //OAuth setup, token storage, and refresh handling
- //Contact upsert semantics and custom-field mapping
- //Social and blog publishing through GHL, with the field gotchas
- //Optional CRM sync for contacts and opportunities
- //Tag and DND operations
- //The undocumented required-field gotchas that cause 4xx loops
Straight from the file
What does the writing look like?
GHL is the dominant infrastructure layer for the BILT CRM customer base and most BILT portfolio marketing apps. Integrating cleanly with GHL is a recurring task — this playbook locks in the patterns and the landmines we've already paid for.
Table of contents
Which sections does the file cover?
- 0. Use this spec
- 1. Architecture
- 2. Schema
- 3. OAuth 2.0 flow (end-user installs your app)
- 4. Private Integration Token (PIT JWT) flow
- 5. API Key (legacy v1) — DO NOT USE
- 6. CRITICAL GOTCHA — userId requirement on create-post
- 7. CRITICAL GOTCHA — destructive sync of boardids
- 8. CRITICAL GOTCHA — media MIME types
- 9. CRITICAL GOTCHA — instagramPostDetails not instagramPost
- 10. Social publish — wire-platform normalizer
- 11. Blog publish
- 12. CRM sync (optional)
- 13. Webhook receiver
- 14. Common pitfalls
- 15. Kickoff prompt
How do you run it?
Drop GHL-INTEGRATION-PLAYBOOK.md into your repo, then tell Claude Code: “Read GHL-INTEGRATION-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.
Who is this for, and who should skip it?
Best for
- Apps serving agencies that run on GoHighLevel
- Content tools posting through GoHighLevel's social planner
- Teams tired of debugging GoHighLevel 4xx errors
Not ideal for
- Apps with no GoHighLevel users
- Simple one-way syncs a no-code tool can handle
- Integrations needing the legacy v1 API
- Builders who won't adapt paths: the file points to a reference app you won't have
What else do people ask?
Should I use OAuth or a Private Integration Token?
The GHL Integration Playbook uses OAuth when users install your app from the GoHighLevel marketplace, and a Private Integration Token (PIT) when the workspace owner has admin access and would rather paste a token. A PIT skips marketplace approval, secret rotation and token refresh, at the cost of a manual step to collect the userId.
What does the GHL Integration Playbook ask for up front?
The GHL Integration Playbook's kickoff prompt asks for your auth strategy (OAuth, PIT or both), marketplace credentials in .env, the scopes you need, and which surfaces you want: social publish, blog publish, CRM sync or webhooks. It pauses for review after the platform_connections schema and the OAuth callback or PIT save ship.
What does it assume about my database?
The GHL Integration Playbook stores connections in a platform_connections table that references a workspaces table, with an RLS policy on workspaces.owner_id and auth.uid(). PIT tokens are kept per workspace in that table, not in environment variables.
What is in the GHL Integration Playbook download?
The GHL Integration Playbook is a markdown file of about 2,200 words. It has SQL for platform_connections, the board_ids JSON shape, TypeScript for the userId check, the truthy-only merge, the MIME mapper and the platform-name normalizer, the required blog post fields and eleven pitfalls. It also tells you to check the listed endpoints against current GoHighLevel docs before shipping.
Why does a GoHighLevel social post return 200 but never show up on Instagram?
The GHL Integration Playbook says the field that works is instagramPostDetails, not instagramPost, even though some GoHighLevel doc pages show the shorter name. The same Details suffix applies to the other platforms, like facebookPostDetails and linkedinPostDetails.
How do we know this?
This page is based on the playbook file itself, GHL-INTEGRATION-PLAYBOOK.md, which Moe Ameen wrote from the Kompozy codebase (called BKE in the file). We read the file on November 4, 2026; the facts here come from it, not from independent testing in other codebases.
More outreach playbooks
Publishing Pipeline
Scheduled posts, a scheduler tick, provider guards, and per-platform normalization.
Read + download →A-tierSMS Copilot Console
Cold-SMS auto-reply: an LLM brain that drafts, and code that decides.
Read + download →A-tierCold Email Campaign
The operational side: folder structure, daily metrics, A/B/C subjects, leak diagnosis.
Read + download →