# Manage A Conversation — Intercom

> Close, snooze, open, or assign a conversation by its ID. Which of the optional props apply depends on Message Type: close uses Body, snoozed uses Snoozed Until, assignment uses Type together with Assignee ID or Team Assignee ID, and open…

- Key: `intercom-manage-conversation`
- Type: Action (Write)
- Version: 0.1.2
- App: Intercom (`intercom`) — https://pipedream.com/apps/intercom.md
- This page (HTML): https://pipedream.com/apps/intercom/actions/manage-conversation
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/intercom/actions/manage-conversation/manage-conversation.mjs

## Description

Close, snooze, open, or assign a conversation by its ID. Which of the optional props apply depends on **Message Type**: `close` uses **Body**, `snoozed` uses **Snoozed Until**, `assignment` uses **Type** together with **Assignee ID** or **Team Assignee ID**, and `open` uses none of them. Example: set **Conversation ID** to `192783634529321`, **Message Type** to `close`, and **Body** to `Issue resolved` to close that conversation with a closing comment. [See the documentation](https://developers.intercom.com/docs/references/2.12/rest-api/api.intercom.io/conversations/manageconversation).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `conversationId` | `string` | Yes | The Intercom provisioned identifier for the conversation (e.g. 192783634529321). Run List Conversations first to discover one, or reuse the ID from a prior Reply To Conversation, Manage A Conversation, or Retrieve Conversation call's response. |
| `messageType` | `string` | Yes | The kind of message being created, which determines the operation performed on the conversation. Use close to close it, snoozed to snooze it, open to reopen it, or assignment to assign it. |
| `adminId` | `string` | Yes | The unique identifier for the admin which is given by Intercom (e.g. 25). Run List Admin ID Options first to discover valid admin IDs. |
| `type` | `string` | No | Whether an assignment targets an admin or a team. Only used when Message Type is assignment. Set admin to assign using Assignee ID, or team to assign using Team Assignee ID. |
| `assigneeId` | `string` | No | The id of the admin which will be assigned the conversation. Only used when Message Type is assignment and Type is admin. Set 0 to assign to no admin (ie. Unassigned). |
| `teamAssigneeId` | `string` | No | The id of the team which will be assigned the conversation. Only used when Message Type is assignment and Type is team. Set 0 to assign to no team (ie. Unassigned). |
| `body` | `string` | No | The text body of the comment. Used when Message Type is close or assignment. |
| `snoozedUntil` | `string` | No | The date and time the conversation will be snoozed until, as an ISO 8601 timestamp — for example 2026-08-24T18:30:00Z. Only used when Message Type is snoozed. |

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

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: "intercom-manage-conversation",
  arguments: {
    conversationId: "Conversation ID",
    messageType: "Message Type",
  },
})
```

**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: "intercom-manage-conversation",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    intercom: { authProvisionId: "apn_xxxxxxx" },
    conversationId: "Conversation ID",
    messageType: "Message Type",
  },
})

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": "intercom-manage-conversation",
    "configured_props": {
      "intercom": { "authProvisionId": "apn_xxxxxxx" },
      "conversationId": "Conversation ID",
      "messageType": "Message Type"
    }
  }'
```

---

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