---
title: "Connect Gong to AI Agents: Generate AI Briefs & Coaching Insights"
slug: connect-gong-to-ai-agents-generate-ai-briefs-coaching-insights
date: 2026-06-08
author: Uday Gajavalli
categories: ["AI & Agents"]
excerpt: "Learn how to connect Gong to ai agents using Truto. Step-by-step guide to tool calling, API quirks, and autonomous workflows."
canonical: https://truto.one/blog/connect-gong-to-ai-agents-generate-ai-briefs-coaching-insights/
---

# Connect Gong to AI Agents: Generate AI Briefs & Coaching Insights


You want to connect Gong to an [AI agent](https://truto.one/what-are-ai-agents-and-how-do-they-work-with-unified-apis/) so your system can automatically read call transcripts, extract coaching insights, orchestrate Gong Engage flows, and generate deal briefs based on historical sales context. Here is exactly how to do it using Truto's `/tools` endpoint and SDK, bypassing the need to build and maintain a custom Gong integration from scratch.

If your team uses ChatGPT, check out our guide on [connecting Gong to ChatGPT](https://truto.one/connect-gong-to-chatgpt-analyze-call-transcripts-activity/), or if you are building on Anthropic's models, read our guide to [connecting Gong to Claude](https://truto.one/connect-gong-to-claude-manage-engage-flows-sales-tasks/). For engineers building custom autonomous workflows, you need a programmatic, framework-agnostic way to fetch Gong API operations as AI-ready tools and bind them to your agent execution loop.

The industry is rapidly shifting from basic generative chat to agentic AI - systems that execute multi-step workflows across your SaaS stack. Giving a Large Language Model (LLM) read and write access to a platform like Gong is an engineering headache. Gong handles massive datasets - hour-long video media files, extensive conversational transcripts, and highly relational CRM mappings. You either spend months building, hosting, and maintaining a custom connector, or you use an infrastructure layer that handles the boilerplate for you.

This guide breaks down exactly how to fetch AI-ready tools for Gong via Truto, bind them natively to an LLM using frameworks like [LangChain](https://truto.one/build-ai-agents-with-langchain-and-truto-unified-api/), LangGraph, or the [Vercel AI SDK](https://truto.one/build-ai-agents-with-vercel-ai-sdk-and-truto-unified-api/), and execute complex sales workflows autonomously.

## The Engineering Reality of Custom Gong Connectors

Building AI agents is easy. Connecting them to external SaaS APIs is hard. 

Giving an LLM access to external data sounds simple in a prototype environment. You write a standard Node.js function that makes an HTTP `fetch` request to the Gong API and wrap it in an `@tool` decorator. In production, this approach collapses entirely. If you decide to build a custom integration for Gong, you own the entire API lifecycle. You must handle [OAuth](https://truto.one/understanding-oauth-flows-for-saas-integrations/) token refreshes, pagination edge cases, and continuous JSON schema maintenance. 

Gong's API introduces several specific integration challenges that routinely break standard CRUD assumptions.

### Granular Scope Fragmentation

Gong enforces highly specific, fragmented OAuth scopes. You do not simply request "call access". If your agent needs to list calls, it needs the `api:calls:read:basic` scope. If it needs detailed metadata, it needs `api:calls:read:extensive`. To actually read the text of the conversation, it requires `api:calls:read:transcript`, and to download the media file, it requires `api:calls:read:media-url`. Hardcoding these scopes into a custom connector means that every time your AI product requires a new capability - like reading team coaching scorecards - you have to force your users through a new OAuth re-consent flow. Truto abstracts this by mapping individual Gong endpoints to `Resources` and `Methods`, allowing you to expose proxy tools dynamically based on the exact authorized scopes of the integrated account.

### Asynchronous LDJSON Workflows

Standard LLMs operate best on synchronous REST APIs: they send a payload and immediately get the modified record back. Gong's CRM ingestion API (`/v2/crm/entities`) does not work this way. To insert or update an Account or Deal, you must upload an LDJSON (Line-Delimited JSON) file. Processing is asynchronous. The API returns a 201 response with a `client_request_id`. The agent must then know to halt, wait, and use a completely separate endpoint (`/v2/crm/request-status`) to poll for success or failure. If you do not explicitly model this asynchronous polling loop as a multi-tool chain, your LLM will hallucinate a success state immediately after the 201 response, proceeding with its workflow while the Gong ingestion pipeline is actually failing in the background.

### Strict Rate Limits and The 429 Reality

Gong enforces strict rate limits to protect its infrastructure, particularly on computationally expensive endpoints like transcripts and AI briefs. When an LLM executes a looping task - like summarizing 50 calls for a specific enterprise account - it will inevitably hit these limits. 

When the upstream Gong API returns an `HTTP 429 Too Many Requests` error, Truto passes that error directly to the caller. Truto does not automatically retry, throttle, or apply backoff logic, as absorbing rate limits in an agentic loop can cause severe latency and context timeouts. Instead, Truto normalizes the upstream rate limit information into standard IETF headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). Your agent's execution layer is fully responsible for reading the `ratelimit-reset` header and applying a native sleep or backoff strategy before retrying the tool call.

## Hero Tools for Gong

Truto maps underlying API endpoints to REST-based CRUD `Resources` and `Methods`. These Methods are exposed as Proxy APIs that handle pagination, authentication, and parameter processing. When you query Truto's `/tools` endpoint, you receive a dynamic array of these Proxy APIs formatted strictly for LLM tool calling.

Here are six high-leverage hero tools for Gong. 

### Fetch Call Transcripts

**Tool Name:** `create_a_gong_calls_transcript`

Despite the "create" naming convention, this tool is used to fetch the actual conversational transcripts for calls that took place during a specified date period. If the LLM has identified a specific target call, it passes the call ID to return only that exact transcript. 

> "Retrieve the transcript for call ID 10984732 and summarize the customer's objections regarding implementation timelines."

### Retrieve AI Deal Briefs

**Tool Name:** `list_all_gong_entities_get_briefs`

Gong has its own native AI briefer configured in the Agent Studio. This tool allows your LLM to fetch pre-generated briefs for an account, deal, contact, or lead directly from Gong, saving your agent from having to download and process hundreds of individual emails and transcripts from scratch.

> "Get the current Deal Brief for the Acme Corp opportunity and tell me what the next steps are for the technical evaluation."

### Track Team Activity Aggregates

**Tool Name:** `create_a_gong_activity_aggregate_by_period`

This tool retrieves aggregated activity statistics for team members over a specified time period. It returns hard counts of calls hosted, calls listened to, comments left, and other tracked actions. This is critical for AI agents tasked with monitoring sales floor productivity.

> "Pull the activity aggregate for John Doe from March 1st to March 15th. How many calls did he host compared to his total call listens?"

### Manage Engage Tasks

**Tool Name:** `update_a_gong_task_by_id`

Gong Engage tasks dictate rep workflows. This tool allows the AI agent to update the status of an existing task - changing it to OPEN, DONE, or DISMISSED. This is incredibly useful for automated workflows where an AI agent validates that an action was completed (like sending a specific email) and programmatically clears the task from the rep's queue.

> "Mark the follow-up email task for the Initech deal as DONE, as I have verified the contract was sent."

### Access Coaching Scorecards

**Tool Name:** `list_all_gong_coachings`

This tool lists all the coaching metrics for a specific manager. When combined with individual scorecard tools, it allows an AI agent to build a comprehensive view of a manager's coaching effectiveness and rep progression over time.

> "Fetch the coaching metrics for regional manager Sarah Smith for Q3. Are her reps improving on the 'Pricing Discovery' scorecard?"

### Synchronize CRM Entities

**Tool Name:** `create_a_gong_crm_entity`

This tool allows the agent to insert, update, or delete CRM entities (Accounts, Contacts, Deals, Leads) inside Gong. Because this utilizes Gong's asynchronous LDJSON ingestion, the agent must pass the `integration_id`, `object_type`, and a `client_request_id`. 

> "Update the Acme Corp CRM entity in Gong to reflect a new deal stage of 'Technical Validation', using client request ID 99281. Then check the status of that request."

For the complete inventory of Gong tools, including digital interactions, data privacy operations, and library folder management, refer to the [Gong integration page](https://truto.one/integrations/detail/gong).

## Workflows in Action

Exposing individual tools to an LLM is only the first step. The true value of an integration layer is enabling multi-step, autonomous workflows that replicate complex human logic. Here are two real-world examples of how an AI agent uses the Gong toolset.

### Scenario 1: The Automated Deal Autopsy

Sales managers spend hours reviewing stalled deals. An AI agent can automatically perform a deal autopsy before the weekly pipeline review, analyzing all recent touchpoints and checking them against coaching frameworks.

> "Analyze the stalled 'Globex Corporation' deal. Find all calls from the last 30 days, read the transcripts to identify objections, check if the rep completed their Engage follow-up tasks, and generate a summary report."

1.  **`list_all_gong_crm_entities`**: The agent searches for the CRM entity ID associated with 'Globex Corporation'.
2.  **`list_all_gong_calls`**: Using the CRM ID, the agent fetches the metadata and IDs for all calls associated with this deal over the last 30 days.
3.  **`create_a_gong_calls_transcript`**: The agent iterates through the call IDs, fetching the transcripts to analyze for customer objections and competitor mentions.
4.  **`create_a_gong_task`**: The agent fetches the Engage tasks assigned to the target rep, filtering by the Globex account to see if follow-ups are OPEN or DONE.
5.  **Output**: The agent synthesizes the transcript data and task statuses into a markdown report, highlighting that the customer brought up a security objection two weeks ago and the rep still has an OPEN task to send the security whitepaper.

### Scenario 2: The Proactive Coaching Assistant

Sales enablement teams need to ensure managers are actively coaching new hires. An AI agent can track manager activity and alert leadership if onboarding reps are being neglected.

> "Review the activity and coaching metrics for the SDR team under Manager Mike. Tell me if any new reps had fewer than 5 calls listened to by a manager this month."

1.  **`list_all_gong_users`**: The agent fetches the roster of users to identify SDRs reporting to Mike.
2.  **`create_a_gong_activity_aggregate_by_period`**: The agent pulls the activity stats for those specific users for the current month.
3.  **`list_all_gong_coachings`**: The agent retrieves the coaching metrics for Manager Mike to cross-reference his activity.
4.  **`list_all_gong_activity_scorecards`**: The agent fetches the scorecards filled out by Mike for his team.
5.  **Output**: The agent identifies two new SDRs who have hosted 20+ calls but have zero logged scorecards or manager listens, alerting sales enablement to intervene.

## Building Multi-Step Workflows

To build these multi-step workflows, you need to extract the proxy definitions from Truto and bind them to your agent framework. 

Truto provides a seamless `/tools` endpoint that outputs schemas compliant with major LLM providers. Rather than hardcoding OpenAPI specs, your application fetches the tools for a specific integrated account dynamically. 

The code block below demonstrates how to use the Truto Langchain.js SDK (`truto-langchainjs-toolset`) to fetch Gong tools, bind them to a LangChain agent, and safely handle the HTTP 429 rate limit errors that Gong will inevitably return during heavy transcript processing.

```typescript
import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor, createToolCallingAgent } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { TrutoToolManager } from "truto-langchainjs-toolset";

// 1. Initialize the LLM
const llm = new ChatOpenAI({
  model: "gpt-4o",
  temperature: 0,
});

// 2. Initialize the Truto Tool Manager with your Truto API Key
const toolManager = new TrutoToolManager({
  apiKey: process.env.TRUTO_API_KEY,
});

async function runGongAgent(integratedAccountId: string, userPrompt: string) {
  // 3. Dynamically fetch Gong tools for the specific user account
  // This queries GET https://api.truto.one/integrated-account/<id>/tools
  const tools = await toolManager.getTools(integratedAccountId);

  // 4. Create the agent prompt
  const prompt = ChatPromptTemplate.fromMessages([
    ["system", "You are a senior sales operations assistant. Use the provided Gong tools to analyze deals and coaching metrics. If a tool fails due to a rate limit, you must wait the specified time and try again."],
    ["human", "{input}"],
    ["placeholder", "{agent_scratchpad}"],
  ]);

  // 5. Bind the Truto tools to the agent
  const agent = createToolCallingAgent({
    llm,
    tools,
    prompt,
  });

  const agentExecutor = new AgentExecutor({
    agent,
    tools,
  });

  let retryCount = 0;
  const maxRetries = 3;

  // 6. Execute the workflow with explicit rate limit handling
  while (retryCount < maxRetries) {
    try {
      console.log(`Executing Gong workflow... Attempt ${retryCount + 1}`);
      const result = await agentExecutor.invoke({
        input: userPrompt,
      });
      
      console.log("Workflow Complete:", result.output);
      return result.output;

    } catch (error: any) {
      // Truto passes upstream HTTP 429s directly. 
      // We must check for status 429 and read the standard IETF headers.
      if (error.status === 429 || error.message.includes("429")) {
        const resetTimeHeader = error.headers?.['ratelimit-reset'];
        const resetSeconds = resetTimeHeader ? parseInt(resetTimeHeader, 10) : 60;
        
        console.warn(`Gong API Rate limit hit. Sleeping for ${resetSeconds} seconds...`);
        await new Promise(resolve => setTimeout(resolve, resetSeconds * 1000));
        retryCount++;
      } else {
        // Unhandled error (e.g. auth failure, bad parameters)
        console.error("Agent execution failed:", error);
        throw error;
      }
    }
  }
  
  throw new Error("Max retries exceeded for Gong rate limits.");
}

// Example execution:
// runGongAgent("gong-account-id-123", "Find all calls for Acme Corp this week and generate a brief.");
```

### The Importance of Explicit Rate Limit Handling

Notice the explicit `try/catch` logic wrapping the `agentExecutor.invoke` method. When an AI agent attempts to fetch transcripts for 20 calls simultaneously, Gong's API will throttle the requests. 

Truto normalizes the upstream response, ensuring that regardless of how Gong formats its error, your application receives the standardized `ratelimit-reset` header. Because Truto does not retry or apply backoff under the hood, your application retains complete control over the execution thread. This prevents your LangChain agent from hanging invisibly for minutes at a time, allowing you to build graceful degradation, user-facing loading states, or intelligent context chunking directly into your application layer.

## Strategic Wrap-Up

Building an AI agent that can converse is fundamentally different from building an AI agent that can execute. Execution requires deterministic, scalable API integrations. 

Gong's highly fragmented scope architecture, complex asynchronous CRM entity ingestion, and strict transcript rate limits make it a notoriously difficult API to integrate from scratch. By leveraging Truto's dynamically generated Proxy APIs, your engineering team bypasses the infrastructure boilerplate. You don't write custom JSON schema mappings. You don't build OAuth token refresh cron jobs. You simply fetch the tools, bind them to your LLM, handle the normalized rate limit headers, and focus entirely on engineering the agent's logic.

:::cta{buttonText="Talk to us" buttonUrl="https://cal.com/truto/partner-with-truto"} 
Stop building boilerplate connectors. Let Truto handle the integration infrastructure so your engineers can focus on building autonomous AI agents.
:::
