# Add New Call — Gong

> Add a new call. See the documentation

- Key: `gong-add-new-call`
- Type: Action (Write)
- Version: 0.0.6
- App: Gong (`gong`) — https://pipedream.com/apps/gong.md
- This page (HTML): https://pipedream.com/apps/gong/actions/add-new-call
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/gong/actions/add-new-call/add-new-call.mjs

## Description

Add a new call. [See the documentation](https://us-66463.app.gong.io/settings/api/documentation#post-/v2/calls)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `clientUniqueId` | `string` | Yes | A call's unique identifier in the PBX or the recording system. Gong uses this identifier to prevent repeated attempts to upload the same recording. |
| `actualStart` | `string` | Yes | The actual date and time when the call started in the ISO-8601 format (e.g., 2018-02-18T02:30:00-07:00 or 2018-02-18T08:00:00Z, where Z stands for UTC). |
| `direction` | `string` | Yes | Whether the call is inbound (someone called the company), outbound (a rep dialed someone outside the company), or a conference call. |
| `primaryUser` | `string` | Yes | The Gong internal user ID of the team member who hosted the call. Options are loaded from the connected account. |
| `parties` | `string[]` | Yes | A list of the call's participants. A party must be provided for the Primary User. Each party can have a JSON stucture like this example: { "phoneNumber": "123123", "emailAddress": "email@example.com", "name": "Name", "mediaChannelId": "1" } |
| `title` | `string` | No | The title of the call. This title is available in the Gong system for indexing and search. |
| `purpose` | `string` | No | The purpose of the call. This optional field is a free text of up to 255 characters. |
| `scheduledStart` | `string` | No | The date and time the call was scheduled to begin in the ISO-8601 format (e.g., 2018-02-18T02:30:00-07:00 or 2018-02-18T08:00:00Z, where Z stands for UTC); |
| `scheduledEnd` | `string` | No | The date and time the call was scheduled to end in the ISO-8601 format (e.g., 2018-02-18T02:30:00-07:00 or 2018-02-18T08:00:00Z, where Z stands for UTC); |
| `duration` | `integer` | No | The actual call duration in seconds. |
| `disposition` | `string` | No | The disposition of the call. The disposition is free text of up to 255 characters. |
| `meetingUrl` | `string` | No | The URL of the conference call by which users join the meeting |
| `callProviderCode` | `string` | No | The code identifies the provider conferencing or telephony system. For example: zoom, clearslide, gotomeeting, ringcentral, outreach, insidesales, etc. These values are predefined by Gong, please contact help@gong.io to find the proper value for your system. |
| `downloadMediaUrl` | `string` | No | The URL from which Gong can download the media file. The URL must be unique, the audio or video file must be a maximum of 1.5GB. If you provide this URL, you should not perform the Add call media step. |
| `workspaceId` | `string` | No | Optional workspace identifier. If specified, the call will be placed into this workspace, otherwise, the default algorithm for workspace placement will be applied. Options are loaded from the connected account. |
| `languageCode` | `string` | No | The language code the call should be transcribed to. This field is optional as Gong automatically detects the language spoken in the call and transcribes it accordingly. Set this field only if you are sure of the language the call is in. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "gong",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "gong-add-new-call",
  arguments: {
    clientUniqueId: "Client Unique ID",
    actualStart: "Actual Start",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "gong-add-new-call",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    gong: { authProvisionId: "apn_xxxxxxx" },
    clientUniqueId: "Client Unique ID",
    actualStart: "Actual Start",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "gong-add-new-call",
    "configured_props": {
      "gong": { "authProvisionId": "apn_xxxxxxx" },
      "clientUniqueId": "Client Unique ID",
      "actualStart": "Actual Start"
    }
  }'
```

---

- App: https://pipedream.com/apps/gong.md · All apps: https://pipedream.com/apps
