Documentation

将 Slack 连接到 Vela

将 Vela 连接到您的 Slack 工作区,以便您的 AI 代理可以回答 Slack 内的问题。

您的 AI 代理在 Slack 内工作。连接后,它会响应提及和直接消息,而无需将用户发送到单独的支持门户。

以下是您需要在 Slack API 端执行的操作。

创建一个 Slack 应用程序

  1. 转至 api.slack.com/apps 并单击 创建新应用程序

  2. 选择从清单。这使您可以使用一个 JSON 文件配置所有内容,而无需单击表单。

  3. 粘贴以下 JSON 清单:

    {
      "display_information": {
        "name": "Your App Name (e.g. Acme Support)"
      },
      "features": {
        "app_home": {
          "home_tab_enabled": false,
          "messages_tab_enabled": true,
          "messages_tab_read_only_enabled": false
        },
        "bot_user": {
          "display_name": "support-bot",
          "always_online": true
        }
      },
      "oauth_config": {
        "scopes": {
          "bot": [
            "app_mentions:read",
            "chat:write",
            "im:history",
            "im:read",
            "im:write",
            "channels:history",
            "channels:read",
            "groups:history",
            "mpim:history"
          ]
        }
      },
      "settings": {
        "event_subscriptions": {
          "request_url": "https://vela.cx/api/integrations/slack/webhook",
          "bot_events": [
            "app_mention",
            "message.im"
          ]
        },
        "org_deploy_enabled": false,
        "socket_mode_enabled": false,
        "token_rotation_enabled": false
      }
    }
  4. 单击“下一步”,然后单击“创建”。

将应用程序安装到您的工作区

  1. 在应用程序的仪表板中,转到左侧边栏的 安装应用程序 部分。

  2. 单击“安装到工作区”并检查权限。批准安装。

复制您的凭据

您需要 Slack 仪表板中的两个值才能在 Vela 中进行连接。

机器人用户 OAuth 令牌 转到安装应用程序页面。复制以xoxb-开头的标记。

签名秘密 转到基本信息。向下滚动到应用程序凭据并复制签名密钥

在 Vela 中连接

打开 Vela 仪表板,导航到 Slack 集成设置,然后粘贴两个凭据。您的 AI 代理现已在 Slack 中运行。