# Gong on boxd

> Gong is a platform for video meetings, call recording, and team collaboration.

- Page: https://boxd.sh/integrations/gong/
- CLI: `run gong` (58 commands, 12 marked common)
- SDK: `import { gong } from "@boxd/run"`; every parameter and response type is at `@boxd/run/gong`
- Triggers: none
- Connect: `run auth gong` (Sign in with Gong), or https://app.boxd.sh/integrations/detail/gong
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth gong      # once: prints a link to connect your account
run gong           # list its commands
run gong list-scorecards
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, gong } from "@boxd/run";

every("1 hour", async () => {
  const result = await gong.listScorecards();
  console.log(result);
});
```

Run it with `run gong.run.ts`. Gong has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run gong <command> --help` lists the optional ones. "common" marks what `run gong` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `add-call-media-v2-calls-id-media` | `gong.addCallMediaV2CallsIdMedia()` | `--id` `--mediaFile` | 0 | Adds a call media, recorded by a telephony system (PBX) or other media recording facility |
| `add-new-call-v2-calls` | `gong.addNewCallV2Calls()` | `--actualStart` `--clientUniqueId` `--direction` `--parties` `--primaryUser` | 15 | When using this endpoint, either provide a downloadMediaUrl or use the returned callId in a follow-up request to /v2/calls/{id}/media to upload the media file |
| `aggregate-activity-by-period-via-api` | `gong.aggregateActivityByPeriodViaApi()` | `--aggregationPeriod` | 6 | Lists the aggregated activity of multiple users within the Gong system for each time period within the defined date range |
| `aggregate-user-activity-statistics` | `gong.aggregateUserActivityStatistics()` | — | 6 | Lists the activity of multiple users within the Gong system during a defined period |
| `assign-prospects-to-flow` | `gong.assignProspectsToFlow()` | `--crmProspectsIds` `--flowId` `--flowInstanceOwnerEmail` | 0 | Use this endpoint to assign a number of prospects to a flow |
| `create-activity-scorecards-report` | `gong.createActivityScorecardsReport()` | — | 8 | Retrieve all the answers for the scorecards that were reviewed during a specified date range, for calls that took place during a specified date range, for specific scorecards or for specific reviewed… |
| `create-new-meeting-v2-meetings` | `gong.createNewMeetingV2Meetings()` | `--endTime` `--invitees` `--organizerEmail` `--startTime` | 2 | When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:meetings:user:create' |
| `create-permission-profile-v2-permission-profile` | `gong.createPermissionProfileV2PermissionProfile()` | `--workspaceId` | 65 | Create a permission profile in a given workspace |
| `data-privacy-for-phone-number` | `gong.dataPrivacyForPhoneNumber()` | `--phoneNumber` | 0 | Shows the elements in the Gong system that reference the given phone number |
| `delete-generic-crm-integration-v2-crm-integrations` | `gong.deleteGenericCrmIntegrationV2CrmIntegrations()` | `--clientRequestId` `--integrationId` | 0 | Deletes an existing generic CRM integration from the Gong platform |
| `delete-meeting` | `gong.deleteMeeting()` | `--meeting-id` `--organizer-email` | 0 | Deletes a Gong meeting created via the Meetings API (Beta) |
| `delete-users-from-call-access-list` | `gong.deleteUsersFromCallAccessList()` | — | 1 | Remove individual user access from calls |
| `erase-data-for-email-address` | `gong.eraseDataForEmailAddress()` | `--emailAddress` | 0 | Erase all data associated with an email address from Gong (GDPR compliance) |
| `erase-data-for-phone-number` | `gong.eraseDataForPhoneNumber()` | `--phoneNumber` | 0 | Given a phone number, this endpoint deletes from the Gong system any leads or contacts with a matching phone number or mobile phone number |
| `fetch-all-permission-profiles` | `gong.fetchAllPermissionProfiles()` | `--workspaceId` | 0 | Returns a list of all permission profiles |
| `get-call-by-id` ·common | `gong.getCallById()` | `--call-id` | 0 | Fetch specific call metadata by call ID |
| `get-call-transcript` ·common | `gong.getCallTranscript()` | `--filter` | 1 | Retrieve call transcripts from Gong |
| `get-crm-integration-details` | `gong.getCrmIntegrationDetails()` | — | 0 | Retrieves details of generic CRM integrations registered with Gong |
| `get-crm-objects-v2-crm-entities` | `gong.getCrmObjectsV2CrmEntities()` | `--integrationId` `--objectType` `--objectsCrmIds` | 0 | Retrieves specific CRM objects by their IDs from Gong's CRM integration |
| `get-flow-prospects` ·common | `gong.getFlowProspects()` | `--crmProspectsIds` | 0 | Retrieve Gong Engage flows assigned to specified prospects |
| `get-interaction-statistics` ·common | `gong.getInteractionStatistics()` | `--filter` | 1 | Retrieve interaction trend statistics for users based on calls with Whisper enabled |
| `get-permission-profile` | `gong.getPermissionProfile()` | `--profileId` | 0 | Returns a permission profile |
| `get-request-status-v2-crm-request-status` | `gong.getRequestStatusV2CrmRequestStatus()` | `--clientRequestId` `--integrationId` | 0 | The GetCRMRequestStatus endpoint retrieves the current status of CRM integration requests in the Gong platform |
| `get-user-by-id` ·common | `gong.getUserById()` | `--user-id` | 0 | Retrieve individual user details by user ID |
| `get-user-settings-history` | `gong.getUserSettingsHistory()` | `--user-id` | 0 | Retrieve historical changes to a user's settings |
| `list-all-coaching-metrics-v2-coaching` | `gong.listAllCoachingMetricsV2Coaching()` | `--from` `--manager--id` `--to` `--workspace--id` | 0 | List all of the coaching metrics of a manager |
| `list-all-company-workspaces-v2-workspaces` | `gong.listAllCompanyWorkspacesV2Workspaces()` | — | 0 | Returns a list of all workspaces including their details |
| `list-all-users-v2-users` | `gong.listAllUsersV2Users()` | — | 2 | List all of the company's users |
| `list-call-outcomes` ·common | `gong.listCallOutcomes()` | — | 0 | Retrieve all available call outcomes defined in Gong |
| `list-engage-flows-v2-flows` | `gong.listEngageFlowsV2Flows()` | `--flowOwnerEmail` | 2 | Engage flows have the following visibility types: * Company: visible to everyone in the company, can only be edited by users with edit permissions. * Personal: reps can set up their own flows which… |
| `list-flow-folders` ·common | `gong.listFlowFolders()` | `--flowFolderOwnerEmail` | 3 | List all Gong Engage flow folders with visibility types |
| `list-folder-calls` | `gong.listFolderCalls()` | `--folderId` | 0 | Given a folder id, this endpoint retrieves a list of calls in it |
| `list-schema-fields-v2-crm-entity-schema` | `gong.listSchemaFieldsV2CrmEntitySchema()` | `--integrationId` `--objectType` | 0 | Retrieves schema fields for a specific CRM object type within a Generic CRM integration |
| `list-scorecards` ·common | `gong.listScorecards()` | — | 0 | Retrieve all scorecards within the Gong system |
| `list-tasks` ·common | `gong.listTasks()` | `--filter` | 1 | Retrieve Engage tasks assigned to a specific user with filtering options |
| `list-users-by-filter-v2-users-extensive` | `gong.listUsersByFilterV2UsersExtensive()` | — | 5 | List multiple Users |
| `manage-user-call-access` | `gong.manageUserCallAccess()` | — | 1 | Retrieves a list of users who have been granted individual access to specific calls through the API |
| `post-day-by-day-activity-stats` | `gong.postDayByDayActivityStats()` | — | 6 | Retrieve the daily activity of multiple users within the Gong system for a range of dates |
| `post-digital-interaction-v2-digital-interaction` | `gong.postDigitalInteractionV2DigitalInteraction()` | `--eventId` `--eventType` `--timestamp` | 38 | When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:digital-interactions:write' |
| `register-crm-integration` | `gong.registerCrmIntegration()` | `--name` `--ownerEmail` | 0 | Updates an existing CRM integration in the Gong platform |
| `report-content-share-event` | `gong.reportContentShareEvent()` | `--contentId` `--contentTitle` `--contentUrl` `--eventTimestamp` `--reportingSystem` | 8 | Push content share engagement events to Gong's activity timeline |
| `report-content-view-event` | `gong.reportContentViewEvent()` | `--contentId` `--contentTitle` `--contentUrl` `--eventTimestamp` `--reportingSystem` | 13 | Log content view engagement events to Gong's activity timeline |
| `report-custom-engagement-event` | `gong.reportCustomEngagementEvent()` | `--eventTimestamp` `--reportingSystem` | 26 | Report custom engagement events to Gong's activity timeline |
| `retrieve-call-data-by-date-range-v2-calls` ·common | `gong.retrieveCallDataByDateRangeV2Calls()` | `--fromDateTime` `--toDateTime` | 2 | List calls that took place during a specified date range |
| `retrieve-data-privacy-info-for-email-address` | `gong.retrieveDataPrivacyInfoForEmailAddress()` | `--emailAddress` | 0 | Retrieves data privacy information for a third-party email address |
| `retrieve-filtered-call-details` | `gong.retrieveFilteredCallDetails()` | — | 25 | Lists detailed call data for calls that took place during a specified date range, have specified call IDs or hosted by specified users |
| `retrieve-library-folders-v2-library-folders` | `gong.retrieveLibraryFoldersV2LibraryFolders()` | `--workspaceId` | 0 | Use this endpoint to retrieve a list of public library folders |
| `retrieve-logs-data-by-type-and-time-range-v2-logs` | `gong.retrieveLogsDataByTypeAndTimeRangeV2Logs()` | `--fromDateTime` `--logType` | 2 | List log entries that took place during a specified time range |
| `retrieve-manual-crm-call-associations` | `gong.retrieveManualCrmCallAssociations()` | `--fromDateTime` | 1 | Returns a list of all calls that were manually associated or re-associated with CRM account and deal/opportunity since a given time |
| `retrieve-tracker-details-v2-settings-trackers` | `gong.retrieveTrackerDetailsV2SettingsTrackers()` | — | 1 | Retrieves details of all keyword trackers in the system or in a given workspace |
| `retrieve-transcripts-of-calls-v2-calls-transcript` ·deprecated | `gong.retrieveTranscriptsOfCallsV2CallsTranscript()` | — | 5 | Use get-call-transcript instead |
| `retrieve-users-from-permission-profile` | `gong.retrieveUsersFromPermissionProfile()` | `--profileId` | 0 | Returns a list of all users whose access is controlled by the given permission profile |
| `set-user-call-access` | `gong.setUserCallAccess()` | `--callAccessList` | 0 | Give individual users access to calls |
| `unassign-flows-by-crm-id` ·common | `gong.unassignFlowsByCrmId()` | `--crmProspectId` | 2 | Unassign flows from prospects by their CRM Prospect ID |
| `update-meeting-v2-meetings-meeting-id` | `gong.updateMeetingV2MeetingsMeetingId()` | `--endTime` `--invitees` `--meetingId` `--organizerEmail` `--startTime` | 2 | When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:meetings:user:update' |
| `update-permission-profile-v2-permission-profile` | `gong.updatePermissionProfileV2PermissionProfile()` | `--profileId` | 65 | Update a permission profile |
| `upload-crm-objects-v2-crm-entities` | `gong.uploadCrmObjectsV2CrmEntities()` | `--dataFile` `--integrationId` `--objectType` | 1 | Uploads CRM entity data to Gong via LDJSON file |
| `validate-meeting-integration` ·common | `gong.validateMeetingIntegration()` | `--user-emails` | 0 | Validates Gong meeting integration status for one or more users by their email addresses |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
