# Twist — Pipedream Connect

> Clear & Organized Team Communication

- API slug: `twist` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Communication
- Website: https://twist.com
- Managed OAuth scopes: `user:write` · `user:read` · `workspaces:write` · `workspaces:read` · `channels:remove` · `channels:write` · `channels:read` · `threads:remove` · `threads:write` · `threads:read` · `comments:remove` · `comments:write` · `comments:read` · `groups:remove` · `groups:write` · `groups:read` · `messages:remove` · `messages:write` · `messages:read` · `reactions:remove` · `reactions:write` · `reactions:read` · `search:read` · `attachments:write` · `attachments:read` · `notifications:write` · `notifications:read`
- This page (HTML): https://pipedream.com/apps/twist
- Tools: 7 actions · 7 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: twist`

```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": "twist",
      },
    },
  },
)

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

const { tools } = await mcp.listTools()

// e.g. run Add Comment:
const result = await mcp.callTool({
  name: "twist-add-comment",
  arguments: {
    thread_id: "Thread id",
    content: "Content",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Twist endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.twist.com/api/v3/users/get_session_user

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkudHdpc3QuY29tL2FwaS92My91c2Vycy9nZXRfc2Vzc2lvbl91c2Vy?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```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: "twist-add-comment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    twist: { authProvisionId: "apn_xxxxxxx" },
    thread_id: "Thread id",
    content: "Content",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (7)

### `twist-add-comment` — Add Comment (Write)

Adds a new comment to a thread.

Full schema: https://pipedream.com/apps/twist/actions/add-comment.md

### `twist-add-message-to-conversation` — Add Message To Conversation (Write)

Adds a message to an existing conversation.

Full schema: https://pipedream.com/apps/twist/actions/add-message-to-conversation.md

### `twist-add-thread` — Add Thread (Write)

Adds a new thread to a channel.

Full schema: https://pipedream.com/apps/twist/actions/add-thread.md

### `twist-get-current-user` — Get Current User (Read-only)

Gets the associated user for access token used in the request.

Full schema: https://pipedream.com/apps/twist/actions/get-current-user.md

### `twist-get-thread` — Get Thread (Read-only)

Gets a thread object by id.

Full schema: https://pipedream.com/apps/twist/actions/get-thread.md

### `twist-get-user-by-email` — Get Workspace User By Email (Read-only)

Gets a workspace user by email.

Full schema: https://pipedream.com/apps/twist/actions/get-user-by-email.md

### `twist-get-workspace-users` — Get Workspace Users (Read-only)

Gets a list of users for the given workspace id.

Full schema: https://pipedream.com/apps/twist/actions/get-workspace-users.md

## Triggers (7)

### `twist-new-channel-instant` — New Channel (Instant) (Instant)

Emit new event for any new channel added in a workspace See the docs here

Full schema: https://pipedream.com/apps/twist/triggers/new-channel-instant.md

### `twist-new-comment-instant` — New Comment (Instant) (Instant)

Emit new event for any new comment in a workspace See the docs here

Full schema: https://pipedream.com/apps/twist/triggers/new-comment-instant.md

### `twist-new-event-instant` — New Event (Instant) (Instant)

Emit new event for any new updates in a workspace See the docs here

Full schema: https://pipedream.com/apps/twist/triggers/new-event-instant.md

### `twist-new-group-instant` — New Group (Instant) (Instant)

Emit new event for any new group added in a workspace See the docs here

Full schema: https://pipedream.com/apps/twist/triggers/new-group-instant.md

### `twist-new-group-user-instant` — New Group User (Instant) (Instant)

Emit new event for any new user added to a workspace group See the docs here

Full schema: https://pipedream.com/apps/twist/triggers/new-group-user-instant.md

### `twist-new-message-instant` — New Message (Instant) (Instant)

Emit new event for any new message in a workspace See the docs here

Full schema: https://pipedream.com/apps/twist/triggers/new-message-instant.md

### `twist-new-thread-instant` — New Thread (Instant) (Instant)

Emit new event for any new thread in a workspace See the docs here

Full schema: https://pipedream.com/apps/twist/triggers/new-thread-instant.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
