docs/integrations/app-integrations/gong.mdx
This documentation describes the integration of MindsDB with Gong, a conversation intelligence platform that captures, analyzes, and provides insights from customer conversations. The integration allows MindsDB to access call recordings, transcripts, analytics, and other conversation data from Gong and enhance it with AI capabilities.
Before proceeding, ensure the following prerequisites are met:
Establish a connection to Gong from MindsDB by executing the following SQL command and providing its handler name as an engine.
CREATE DATABASE gong_datasource
WITH
ENGINE = 'gong',
PARAMETERS = {
"api_key": "your_gong_api_key_here"
};
CREATE DATABASE gong_datasource
WITH
ENGINE = 'gong',
PARAMETERS = {
"access_key": "your_access_key",
"secret_key": "your_secret_key"
};
Required connection parameters include the following:
Authentication (choose one method):
api_key: Bearer token for authentication (recommended)access_key + secret_key: Basic authentication credentials (alternative method)Optional connection parameters include the following:
base_url: Gong API base URL. This parameter defaults to https://api.gong.io.timeout: Request timeout in seconds. This parameter defaults to 30.The following usage examples utilize gong_datasource as the datasource name, which is defined in the CREATE DATABASE command.
The Gong handler provides access to the following tables:
calls - Access call recordings and metadatausers - Get user information and permissionsanalytics - Access AI-generated conversation insightstranscripts - Get full conversation transcriptsRetrieve recent calls with date filters (recommended for best performance):
SELECT *
FROM gong_datasource.calls
WHERE date >= '2024-01-01' AND date < '2024-02-01'
ORDER BY date DESC
LIMIT 20;
Get all users in your organization:
SELECT user_id, name, email, role, status
FROM gong_datasource.users
LIMIT 100;
Get analytics for calls with high sentiment scores:
SELECT call_id, sentiment_score, key_phrases, topics
FROM gong_datasource.analytics
WHERE sentiment_score > 0.7
AND date >= '2024-01-01'
LIMIT 50;
Get transcripts for a specific call:
SELECT speaker, timestamp, text
FROM gong_datasource.transcripts
WHERE call_id = '12345'
ORDER BY timestamp;
Get calls with their sentiment analysis:
SELECT
c.title,
c.date,
c.duration,
a.sentiment_score,
a.key_phrases
FROM gong_datasource.calls c
JOIN gong_datasource.analytics a ON c.call_id = a.call_id
WHERE c.date >= '2024-01-01' AND c.date < '2024-02-01'
ORDER BY a.sentiment_score DESC
LIMIT 25;
Find calls where specific keywords were mentioned:
SELECT
c.title,
c.date,
t.speaker,
t.text
FROM gong_datasource.calls c
JOIN gong_datasource.transcripts t ON c.call_id = t.call_id
WHERE c.date >= '2024-01-01'
AND t.text LIKE '%pricing%'
LIMIT 50;
Get user performance with call sentiment:
SELECT
u.name,
u.email,
c.call_id,
c.title,
a.sentiment_score
FROM gong_datasource.users u
JOIN gong_datasource.calls c ON u.user_id = c.user_id
JOIN gong_datasource.analytics a ON c.call_id = a.call_id
WHERE c.date >= '2024-01-01'
AND a.sentiment_score > 0.8
LIMIT 100;
| Column | Description |
|---|---|
call_id | Unique identifier for the call (Primary Key) |
title | Call title or description |
date | Call date and time (ISO-8601 format) |
duration | Call duration in seconds |
recording_url | URL to the call recording |
call_type | Type of call (e.g., "sales", "demo") |
user_id | ID of the user who made the call |
participants | Comma-separated list of participants |
status | Call status |
| Column | Description |
|---|---|
user_id | Unique identifier for the user (Primary Key) |
name | User's full name |
email | User's email address |
role | User's role in the organization |
permissions | Comma-separated list of user permissions |
status | User status |
| Column | Description |
|---|---|
call_id | Reference to the call (Primary Key, Foreign Key to calls.call_id) |
sentiment_score | Sentiment analysis score |
topic_score | Topic detection score |
key_phrases | Comma-separated list of key phrases |
topics | Comma-separated list of detected topics |
emotions | Comma-separated list of detected emotions |
confidence_score | Confidence score for the analysis |
| Column | Description |
|---|---|
segment_id | Unique identifier for the transcript segment (Primary Key) |
call_id | Reference to the call (Foreign Key to calls.call_id) |
speaker | Name of the speaker |
timestamp | Timestamp of the transcript segment (ISO-8601 format) |
text | Transcribed text |
confidence | Confidence score for the transcription |
access_key and secret_key are correct.
</Warning>