> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minidesk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Make

> 在会话到达或发生变化时运行 Make 场景。

Make（原 Integromat）通过内置的 **Webhooks** 和 **HTTP** 应用连接 miniDesk，使用的 [Webhook](https://docs.minidesk.ai/guides/webhooks.md) 和 [API](https://docs.minidesk.ai/api-reference/introduction.md) 与其他集成相同。

## 在 miniDesk 事件发生时启动场景

1. 在 Make 中，将 **Webhooks → Custom webhook** 模块添加为触发器，并复制 Make 为其生成的地址。
2. 在 miniDesk 中，前往 **Settings → Webhooks**，选择 **Add webhook**，粘贴该地址并选择事件：新会话、新客户消息、状态变更、已分配。
3. 回到 Make，选择 **Redetermine data structure**，然后在 miniDesk 中打开该 Webhook 并选择 **Send test event**。Make 现在已了解这些字段。

每个事件都有相同的信封结构：`type`、`created_at` 和 `data`，其中包含 `data.conversation`、`data.message`、`data.change` 和 `data.actor`。[Webhook 指南](https://docs.minidesk.ai/guides/webhooks.md)列出了每个事件携带的内容。

要确认调用确实来自 miniDesk，请按照 [Webhook 指南](https://docs.minidesk.ai/guides/webhooks.md#verifying-the-signature)所示，将 `miniDesk-Signature` 请求头与该 Webhook 的密钥进行比对。

> [!TIP]
>
> 要获取真实会话的字段而非测试事件的字段，请使用您的 API 密钥调用
> `GET /v1/webhooks/samples?event=conversation.created`。它会以一次投递的格式返回您最新的三个会话。

## 在场景中对 miniDesk 执行操作

使用 **HTTP → Make a request**，并填入您在 **Settings → API** 中获取的 API 密钥：

* **Headers**：`Authorization: Bearer <your key>`。
* **Body type**：Raw、JSON。

| 用途 | 方法与 URL | 请求体 |
| - | - | - |
| 回复客户 | `POST https://api.minidesk.ai/v1/tickets/{id}/messages` | `{ "body": "…", "visibility": "public" }` |
| 添加内部备注 | `POST https://api.minidesk.ai/v1/tickets/{id}/messages` | `{ "body": "…", "visibility": "internal" }` |
| 更改状态或负责人 | `PATCH https://api.minidesk.ai/v1/tickets/{id}` | `{ "status": "resolved" }` |
| 创建或更新客户 | `PUT https://api.minidesk.ai/v1/customers` | `{ "email": "…", "name": "…" }` |

公开回复会送达真实的人，且无法撤回。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.