Gong Integration (Sales Calls)
Connection
- Base URL:
GONG_API_BASE if configured, otherwise https://api.gong.io/v2
- Auth: HTTP Basic —
Base64($GONG_ACCESS_KEY:$GONG_ACCESS_SECRET)
- Env vars:
GONG_ACCESS_KEY, GONG_ACCESS_SECRET, optional GONG_API_BASE
- Caching: 10-minute in-memory cache, max 120 entries
Server Lib & Action
- File:
server/lib/gong.ts
- Action:
gong-calls
- Bundled deep-dive action:
account-deep-dive for HubSpot + Gong account
or deal investigations.
Exported Functions
| Function |
Description |
getCalls(filters?) |
List calls (cursor-paginated) |
getCall(callId) |
Get single call detail |
getCallTranscript(callId) |
Get one call transcript |
getCallTranscripts(callIds) |
Batch-fetch call transcripts |
getUsers() |
List Gong users |
searchCalls(query, days) |
List + filter by title and external party name/email/domain |
getCallDetail(callId) |
Get parties plus Gong brief/key points/outline |
getEnrichedTranscript(id) |
Transcript mapped to Gong parties and external speakers |
UI API Routes
| Route |
Description |
GET /api/gong/calls |
List/search calls |
GET /api/gong/users |
List users |
Use gong-calls for agent-facing Gong work. Do not call /api/gong/*
directly from the agent.
Script Usage
# Recent calls with a customer, including call-content evidence
pnpm action gong-calls --company="Example Inc" --days=180 --includeTranscripts=true --transcriptLimit=5
# HubSpot + Gong account/deal deep dive
pnpm action account-deep-dive --query="Example Inc" --days=180 --gongLimit=10 --transcriptLimit=5
# Get compact transcript text
pnpm action gong-calls --transcript=<callId>
# Get the raw transcript payload only for debugging/export
pnpm action gong-calls --transcript=<callId> --rawTranscript=true
# List Gong users
pnpm action gong-calls --users
Key Patterns & Gotchas
- IMPORTANT API endpoints:
GET /v2/calls — lists calls (with fromDateTime, toDateTime, cursor params)
POST /v2/calls — uploading/creating calls (NOT listing). Using this for listing returns 400 errors about missing fields.
POST /v2/calls/extensive — detailed call data with party info
POST /v2/calls/transcript — get transcripts
- Search pattern: List calls via
GET /v2/calls?fromDateTime=..., then filter client-side by company name, domain, person, or email against title and external parties. The search path batches /v2/calls/extensive for party matching when the lightweight list response is missing parties. No server-side company name search.
- Transcripts:
gong-calls --transcript=<callId> returns compact extracted text by default. Set rawTranscript=true only for debugging/export; do not pass raw transcript payloads into save-analysis.
- Raw Gong transcript payloads have
speakerId (numeric), topic (string or null), sentences array with start/end (ms) and text. Speaker IDs need cross-referencing with call parties.
- For deal/customer deep dives, call
account-deep-dive first when HubSpot context matters. For Gong-only follow-up, set includeTranscripts=true; call metadata alone is not enough for objections, risks, sentiment, or next-step claims.
- Region/hostname is configurable with
GONG_API_BASE; omit it for the global endpoint.
Complete-Coverage Transcript Scan
When the question asks whether any call in a cohort mentions something, do not
answer from call metadata, titles, briefs, or sampled transcript excerpts. Use a
raw transcript corpus path:
- Discover or stage the exact call IDs in scope with bounded filters and
explicit coverage counts.
- Prefer
provider-corpus-job with mode: "batch-search" against
POST /calls/transcript.
- Use
batch.itemBodyPath: "filter.callIds", batch.responseItemsPath: "callTranscripts", batch.batchSize: 20, search.textPaths: ["transcript"], and search.idPaths: ["callId"].
- Join the stored hits back to deals/accounts with
run-code or staged-dataset
queries, then report cohort size, call IDs discovered, transcript records
scanned, hits, errors, and quota gaps.
Use provider-api-catalog --provider=gong to retrieve the reusable corpus
recipe. A metadata scan over /calls or /calls/extensive is useful for call
discovery, but it is not evidence that transcript text lacks a phrase.
1---2name: gong-23description: Search sales call recordings, transcripts, and participants via Gong. Use this skill when the user asks about sales calls, customer conversations, or call transcripts.4---56# Gong Integration (Sales Calls)78## Connection910- **Base URL**: `GONG_API_BASE` if configured, otherwise `https://api.gong.io/v2`11- **Auth**: HTTP Basic — `Base64($GONG_ACCESS_KEY:$GONG_ACCESS_SECRET)`12- **Env vars**: `GONG_ACCESS_KEY`, `GONG_ACCESS_SECRET`, optional `GONG_API_BASE`13- **Caching**: 10-minute in-memory cache, max 120 entries1415## Server Lib & Action1617- **File**: `server/lib/gong.ts`18- **Action**: `gong-calls`19- **Bundled deep-dive action**: `account-deep-dive` for HubSpot + Gong account20 or deal investigations.2122### Exported Functions2324| Function | Description |25| ----------------------------- | ----------------------------------------------------------- |26| `getCalls(filters?)` | List calls (cursor-paginated) |27| `getCall(callId)` | Get single call detail |28| `getCallTranscript(callId)` | Get one call transcript |29| `getCallTranscripts(callIds)` | Batch-fetch call transcripts |30| `getUsers()` | List Gong users |31| `searchCalls(query, days)` | List + filter by title and external party name/email/domain |32| `getCallDetail(callId)` | Get parties plus Gong brief/key points/outline |33| `getEnrichedTranscript(id)` | Transcript mapped to Gong parties and external speakers |3435### UI API Routes3637| Route | Description |38| --------------------- | ----------------- |39| `GET /api/gong/calls` | List/search calls |40| `GET /api/gong/users` | List users |4142Use `gong-calls` for agent-facing Gong work. Do not call `/api/gong/*`43directly from the agent.4445## Script Usage4647```bash48# Recent calls with a customer, including call-content evidence49pnpm action gong-calls --company="Example Inc" --days=180 --includeTranscripts=true --transcriptLimit=55051# HubSpot + Gong account/deal deep dive52pnpm action account-deep-dive --query="Example Inc" --days=180 --gongLimit=10 --transcriptLimit=55354# Get compact transcript text55pnpm action gong-calls --transcript=<callId>5657# Get the raw transcript payload only for debugging/export58pnpm action gong-calls --transcript=<callId> --rawTranscript=true5960# List Gong users61pnpm action gong-calls --users62```6364## Key Patterns & Gotchas6566- **IMPORTANT API endpoints**:67 - `GET /v2/calls` — lists calls (with `fromDateTime`, `toDateTime`, `cursor` params)68 - `POST /v2/calls` — **uploading/creating** calls (NOT listing). Using this for listing returns 400 errors about missing fields.69 - `POST /v2/calls/extensive` — detailed call data with party info70 - `POST /v2/calls/transcript` — get transcripts71- **Search pattern**: List calls via `GET /v2/calls?fromDateTime=...`, then filter client-side by company name, domain, person, or email against title and external parties. The search path batches `/v2/calls/extensive` for party matching when the lightweight list response is missing parties. No server-side company name search.72- **Transcripts**: `gong-calls --transcript=<callId>` returns compact extracted text by default. Set `rawTranscript=true` only for debugging/export; do not pass raw transcript payloads into `save-analysis`.73- Raw Gong transcript payloads have `speakerId` (numeric), `topic` (string or null), `sentences` array with `start`/`end` (ms) and `text`. Speaker IDs need cross-referencing with call parties.74- For deal/customer deep dives, call `account-deep-dive` first when HubSpot context matters. For Gong-only follow-up, set `includeTranscripts=true`; call metadata alone is not enough for objections, risks, sentiment, or next-step claims.75- Region/hostname is configurable with `GONG_API_BASE`; omit it for the global endpoint.7677## Complete-Coverage Transcript Scan7879When the question asks whether any call in a cohort mentions something, do not80answer from call metadata, titles, briefs, or sampled transcript excerpts. Use a81raw transcript corpus path:82831. Discover or stage the exact call IDs in scope with bounded filters and84 explicit coverage counts.852. Prefer `provider-corpus-job` with `mode: "batch-search"` against86 `POST /calls/transcript`.873. Use `batch.itemBodyPath: "filter.callIds"`, `batch.responseItemsPath:88"callTranscripts"`, `batch.batchSize: 20`, `search.textPaths:89["transcript"]`, and `search.idPaths: ["callId"]`.904. Join the stored hits back to deals/accounts with `run-code` or staged-dataset91 queries, then report cohort size, call IDs discovered, transcript records92 scanned, hits, errors, and quota gaps.9394Use `provider-api-catalog --provider=gong` to retrieve the reusable corpus95recipe. A metadata scan over `/calls` or `/calls/extensive` is useful for call96discovery, but it is not evidence that transcript text lacks a phrase.