---
title: Slack 集成
description: 将 Slack 连接到团队频道，直接接收构建通知。Slack 集成适用于 Pro 方案。
---

> **For AI agents:** the complete documentation index is at [llms.txt](/docs/llms.txt). Append `.md` to any page URL for its markdown version.

将 Slack 连接到团队频道，直接接收构建通知。

<Note>
Slack 集成适用于 Pro 方案。
</Note>

## 设置 Slack

<Steps>
  <Step title="创建 Slack Webhook">
    在 Slack 中：
    1. 前往工作区设置
    2. 转到 **Apps** → **Incoming Webhooks**
    3. 点击 **Add to Slack**
    4. 选择一个频道
    5. 复制 Webhook URL
  </Step>
  <Step title="添加到 Jamdesk">
    在 Jamdesk 项目中：
    1. 前往 **Integrations**
    2. 点击 **Connect Slack**
    3. 粘贴 Webhook URL
    4. 点击 **Save**
  </Step>
  <Step title="测试连接">
    点击 **Send Test**，验证集成是否正常工作。
  </Step>
</Steps>

## 通知偏好

选择触发通知的构建结果：

| 事件 | 默认值 | 描述 |
|-------|---------|-------------|
| 构建成功 | 开启 | 构建成功完成时发送通知 |
| 构建失败 | 开启 | 构建失败时发送通知 |

两项默认均已启用。设置完成后，如需更改偏好，请切换复选框并点击 **Update**。

## 消息格式

通知包括：

- 项目名称
- 构建状态
- 提交消息和作者
- 构建详情链接
- 持续时间（针对已完成的构建）

示例：
``` text
✓ Docs build succeeded
Project: My Docs
Commit: "Add authentication guide" by @username
Duration: 45s
View build →
```

## 移除 Slack

如需断开连接：

1. 前往 **Integrations**
2. 点击 Slack 旁边的 **Disconnect**
3. 确认移除

## 故障排除

<Accordion title="未显示通知">
  1. 检查 Webhook URL 是否正确
  2. 确认频道仍然存在
  3. 发送测试通知
  4. 检查 Slack 的传入 Webhook 设置
</Accordion>

<Accordion title="更改的偏好未保存">
  切换通知复选框后，点击出现的 **Update** 按钮。更改不会自动保存。
</Accordion>

## 相关文章

<Columns cols={2}>
  <Card title="监控构建" icon="chart-line" href="/cn/builds/monitoring">
    在仪表板中跟踪构建
  </Card>
  <Card title="Slack 问题" icon="wrench" href="/cn/help/troubleshooting/slack-issues">
    排查 Slack 问题
  </Card>
</Columns>