home / skills / openclaw / skills / gong

gong skill

/skills/jdrhyne/gong

This skill helps you search Gong calls, transcripts, and analytics, enabling efficient access to conversations and metrics.

npx playbooks add skill openclaw/skills --skill gong

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
3.7 KB
---
name: gong
description: Gong API for searching calls, transcripts, and conversation intelligence. Use when working with Gong call recordings, sales conversations, transcripts, meeting data, or conversation analytics. Supports listing calls, fetching transcripts, user management, and activity stats.
metadata:
  {
    "openclaw":
      {
        "emoji": "πŸŽ™οΈ",
        "requires":
          {
            "config": ["~/.config/gong/credentials.json"],
          },
      },
  }
---

# Gong

Access Gong conversation intelligence - calls, transcripts, users, and analytics.

## Setup

Store credentials in `~/.config/gong/credentials.json`:
```json
{
  "base_url": "https://us-XXXXX.api.gong.io",
  "access_key": "YOUR_ACCESS_KEY",
  "secret_key": "YOUR_SECRET_KEY"
}
```

Get credentials from Gong: Settings β†’ Ecosystem β†’ API β†’ Create API Key.

## Authentication

```bash
GONG_CREDS=~/.config/gong/credentials.json
GONG_BASE=$(jq -r '.base_url' $GONG_CREDS)
GONG_AUTH=$(jq -r '"\(.access_key):\(.secret_key)"' $GONG_CREDS | base64)

curl -s "$GONG_BASE/v2/endpoint" \
  -H "Authorization: Basic $GONG_AUTH" \
  -H "Content-Type: application/json"
```

## Core Operations

### List Users
```bash
curl -s "$GONG_BASE/v2/users" -H "Authorization: Basic $GONG_AUTH" | \
  jq '[.users[] | {id, email: .emailAddress, name: "\(.firstName) \(.lastName)"}]'
```

### List Calls (with date range)
```bash
curl -s -X POST "$GONG_BASE/v2/calls/extensive" \
  -H "Authorization: Basic $GONG_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "fromDateTime": "2025-01-01T00:00:00Z",
      "toDateTime": "2025-01-31T23:59:59Z"
    },
    "contentSelector": {}
  }' | jq '{
    total: .records.totalRecords,
    calls: [.calls[] | {
      id: .metaData.id,
      title: .metaData.title,
      started: .metaData.started,
      duration_min: ((.metaData.duration // 0) / 60 | floor),
      url: .metaData.url
    }]
  }'
```

### Get Call Transcript
```bash
curl -s -X POST "$GONG_BASE/v2/calls/transcript" \
  -H "Authorization: Basic $GONG_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"filter": {"callIds": ["CALL_ID"]}}' | \
  jq '.callTranscripts[0].transcript[] | "\(.speakerName // "Speaker"): \(.sentences[].text)"' -r
```

### Get Call Details
```bash
curl -s -X POST "$GONG_BASE/v2/calls/extensive" \
  -H "Authorization: Basic $GONG_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {"callIds": ["CALL_ID"]},
    "contentSelector": {"exposedFields": {"content": true, "parties": true}}
  }' | jq '.calls[0]'
```

### Activity Stats
```bash
curl -s -X POST "$GONG_BASE/v2/stats/activity/aggregate" \
  -H "Authorization: Basic $GONG_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "fromDateTime": "2025-01-01T00:00:00Z",
      "toDateTime": "2025-01-31T23:59:59Z"
    }
  }'
```

## Endpoints Reference

| Endpoint | Method | Use |
|----------|--------|-----|
| `/v2/users` | GET | List users |
| `/v2/calls/extensive` | POST | List/filter calls |
| `/v2/calls/transcript` | POST | Get transcripts |
| `/v2/stats/activity/aggregate` | POST | Activity stats |
| `/v2/meetings` | GET | Scheduled meetings |

## Pagination

Responses include cursor for pagination:
```json
{"records": {"totalRecords": 233, "cursor": "eyJ..."}}
```

Include cursor in next request: `{"cursor": "eyJ..."}`

## Date Helpers

```bash
# Last 7 days
FROM=$(date -v-7d +%Y-%m-%dT00:00:00Z 2>/dev/null || date -d "7 days ago" +%Y-%m-%dT00:00:00Z)
TO=$(date +%Y-%m-%dT23:59:59Z)
```

## Notes

- Rate limit: ~3 requests/second
- Call IDs are large integers as strings
- Transcripts may take time to process after call ends
- Date format: ISO 8601 (e.g., `2025-01-15T00:00:00Z`)

Overview

This skill provides programmatic access to Gong conversation intelligence: calls, transcripts, users, meetings, and activity analytics. It exposes endpoints to list and filter calls, fetch transcripts and call details, aggregate activity stats, and manage users. It’s designed for workflows that need search, archival, or analytics over Gong recording data.

How this skill works

The skill authenticates to Gong using a base URL and API keys stored locally, then calls Gong REST endpoints (v2) to list users, query calls, retrieve transcripts, and run aggregated stats. Requests use JSON filters for date ranges, call IDs, pagination cursors, and content selectors to control returned fields. Transcripts may be requested separately and can take time to appear after a call ends.

When to use it

  • You need to archive or back up Gong calls and transcripts for compliance or storage.
  • You want to build search or analytics over sales conversations and call metadata.
  • You need per-user or team activity metrics across a date range.
  • You want to fetch full call details or speaker-segmented transcripts for coaching.
  • You need to paginate large result sets and resume queries using cursors.

Best practices

  • Store credentials securely (e.g., ~/.config/gong/credentials.json) and avoid embedding keys in code.
  • Use date filters and content selectors to limit payloads and reduce rate consumption.
  • Respect the rate limit (~3 requests/second) and implement retry/backoff for 429s.
  • Use pagination cursors from responses to iterate large result sets reliably.
  • Allow time for transcripts to be processed before requesting them for recent calls.

Example use cases

  • List all calls for a sales rep in a given month and export title, start time, duration, and URL.
  • Fetch the transcript for a specific call ID and extract speaker segments for coaching notes.
  • Run activity aggregation for a quarter to produce team-level call volume and engagement stats.
  • Back up user lists and scheduled meetings for auditing or migration to another system.
  • Build a search index of call transcripts filtered by date and specific keywords.

FAQ

How do I authenticate requests?

Store base_url, access_key, and secret_key locally and send Authorization: Basic with base64(access_key:secret_key).

How do I handle large result sets?

Use the returned pagination cursor and include it in subsequent requests to page through results.