# Update Ticket Comment — Zoho Desk

> Updates an existing comment on a ticket. See the documentation

- Key: `zoho_desk-update-ticket-comment`
- Type: Action (Write)
- Version: 0.0.3
- App: Zoho Desk (`zoho_desk`) — https://pipedream.com/apps/zoho-desk.md
- This page (HTML): https://pipedream.com/apps/zoho-desk/actions/update-ticket-comment
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/zoho_desk/actions/update-ticket-comment/update-ticket-comment.mjs

## Description

Updates an existing comment on a ticket. [See the documentation](https://desk.zoho.com/DeskAPIDocument#TicketsComments_Updateticketcomment)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `orgId` | `string` | Yes | The ID of the organization Options are loaded from the connected account. |
| `ticketId` | `string` | Yes | The ID of the ticket Options are loaded from the connected account. |
| `commentId` | `string` | Yes | The ID of the ticket comment Options are loaded from the connected account. |
| `content` | `string` | No | Updated content of the comment. To retrieve or set user mentions, use this code format: zsu[@user:{zuid}zsu. |
| `contentType` | `string` | No | Used to denote the content-type which may be html or plainText. The default type is html. |

## 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": "zoho_desk",
      },
    },
  },
)

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: "zoho_desk-update-ticket-comment",
  arguments: {
    orgId: "Organization ID",
    ticketId: "Ticket ID",
  },
})
```

**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: "zoho_desk-update-ticket-comment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    zoho_desk: { authProvisionId: "apn_xxxxxxx" },
    orgId: "Organization ID",
    ticketId: "Ticket ID",
  },
})

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": "zoho_desk-update-ticket-comment",
    "configured_props": {
      "zoho_desk": { "authProvisionId": "apn_xxxxxxx" },
      "orgId": "Organization ID",
      "ticketId": "Ticket ID"
    }
  }'
```

---

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