With the Feishu messaging channel, you can talk to StoreClaw directly inside Feishu and also send scheduled task results to a designated group chat or conversation. This guide explains how to create an internal app in the Feishu Open Platform, enable the bot capability, and complete the StoreClaw connection.

Prerequisites

Before you begin, make sure the following three requirements are met:

  1. Feishu account: You already have a Feishu account and can sign in normally.
  2. Organization membership (Org): Your account has joined a Feishu organization or team. A Feishu internal app (Custom App) must belong to an organization. A personal account cannot create one independently.
  3. Developer permissions: Your account has Developer or Organization Admin access in that organization. Regular members cannot create apps in the Open Platform. If you do not have permission, contact your organization admin.

Step 1: Sign in to the Feishu Open Platform

Visit Feishu Open Platform, sign in with your Feishu account, and click Developer Console in the upper-right corner to enter the console.

Feishu Developer Console

Step 2: Create an Internal App (Custom App)

  1. Click Create Custom App. Feishu Create Custom App
  2. Enter the app name and description, then confirm to finish creation. Feishu Create App Confirm

Step 3: Enable the Bot Capability

  1. Open the app details page.
  2. Click Add Features in the left-side menu.
  3. Find the Bot card and click Add.

Feishu Enable Bot

Note: The app can receive and send messages as a bot only after the bot capability is enabled.

Step 4: Configure Permissions & Scopes

  1. Open Permissions & Scopes in the left-side menu.
  2. Click Add Permission Scopes to app, search for the required scopes, and add them.
  3. Click Add Scopes to save the permission configuration.

Feishu Permission Scope

Required Permissions

The following permissions are required for basic bot messaging capability:

  • im:message: Basic message permission
  • im:message:send_as_bot: Send messages as the bot
  • im:message.group_msg: Send group messages
  • im:chat: Access conversations
  • im:resource: Send rich media such as images and files
  • contact:user.base:readonly: Read basic user information for @mentions

Optional Permissions

If you want the bot to receive user messages, it is recommended to add these as well:

  • im:message:readonly: Read message content
  • im:message.p2p_msg:readonly: Read direct messages
  • im:message.group_at_msg:readonly: Read group messages that mention the bot
  • im:chat.access_event.bot_p2p_chat:read: Receive bot private chat event pushes

Tip: If you only need StoreClaw to send messages to a group for now, the base messaging permissions are enough to start. If you want full two-way conversations, also add the message-reading and event-related permissions.

Step 5: Configure Events and Callbacks

  1. Open the Events & Callbacks page from the left-side menu.
  2. Click the pencil icon next to the subscription method.
  3. Select Receive events through persistent connection.

Feishu Event Configuration

  1. Add the following events:

    • reaction.created
    • reaction.deleted
    • Message received

Feishu Event Added

Note: Persistent connection is usually the better fit for this bot scenario because it is easier to configure and does not require a public callback URL.

Step 6: Publish for Approval, If Required

If your organization has app approval enabled, you must create a version and complete the approval flow first:

  1. Open Version Management & Release in the left-side menu.
  2. Click Create Version.

Feishu Create Version

  1. Fill in the version notes and submit them.

Feishu Version Confirm

  1. Wait for approval from the organization administrator.

Note: If your organization does not require approval, you can skip this step.

After approval succeeds, you can usually find the app in the Feishu assistant and start a conversation with it.

Feishu Open App

Step 7: Get the Credentials

  1. Open Credentials & Basic Info from the left-side menu.
  2. In the Credentials section, copy the following two values:

    • App ID
    • App Secret

These two values need to be entered in the Feishu configuration page in StoreClaw.

Feishu Credentials

Complete the Configuration in StoreClaw

  1. Return to StoreClaw and open the Messaging Channels page.
  2. Find the Feishu Bot card and click Configure.
  3. Paste the App ID and App Secret you copied earlier.
  4. Save the configuration. If the card shows a connected status, the setup is complete.

After that, you can start talking to StoreClaw AI through Feishu.

What You Can Do After Connecting

After the connection is complete, you can:

  • Talk to StoreClaw Bot in Feishu direct chats or group chats
  • Mention the bot in a channel to send tasks or questions
  • Send scheduled task results to Feishu groups or designated conversations

FAQ

Q: I signed in to the Open Platform, but I cannot see Developer Console. Why?

A: Make sure your account has joined a Feishu organization and that the organization administrator has granted you developer permissions.

Q: I created the app, but the bot cannot send messages. What should I check?

A: Check the following first:

  • Whether the bot capability in Step 3 has been enabled
  • Whether the permissions in Step 4 were saved successfully
  • If your organization uses app approval, whether the approval in Step 6 has already passed

Q: What should I do if the App Secret is leaked?

A: Go to the Credentials page and click Reset to rotate the secret. The old secret becomes invalid immediately, and you must update the value in StoreClaw as well.

通过飞书消息渠道,您可以直接在飞书中与 StoreClaw 对话,也可以将定时任务结果推送到指定群聊或会话。本文介绍如何在飞书开放平台创建自建应用,启用机器人能力,并完成与 StoreClaw 的连接。

前置条件

开始前,请确认以下三项均已满足:

  1. 飞书账号: 已注册并可正常登录飞书。
  2. 所属企业(Org): 当前账号已加入一个飞书企业或团队。飞书自建应用(Custom App)必须挂在企业下,个人账号无法单独创建应用。
  3. 开发者权限: 当前账号在该企业内具备 开发者企业管理员 权限。普通成员无权在开放平台(Open Platform)创建应用;如权限不足,请联系企业管理员开通。

第一步:登录飞书开放平台

访问 Feishu Open Platform,使用飞书账号完成注册或登录后,点击右上角 开发者后台 进入控制台。

Feishu Developer Console

第二步:创建自建应用(Custom App)

  1. 点击 创建企业自建应用Feishu Create Custom App
  2. 填写应用名称和描述,点击确认,完成创建。 Feishu Create App Confirm

第三步:启用机器人能力

  1. 进入应用详情页。
  2. 点击左侧菜单 添加应用能力
  3. 找到 机器人 卡片并点击 添加

Feishu Enable Bot

注意: 只有启用机器人能力后,该应用才能作为机器人接收和发送消息。

第四步:配置权限与范围(Permissions & Scopes)

  1. 点击左侧菜单 权限管理
  2. 点击开通权限,搜索并添加以下权限。
  3. 点击 确认开通权限 保存配置。

Feishu Permission Scope

必须添加的权限

以下权限用于支持机器人基础消息能力:

  • im:message:消息基础权限
  • im:message:send_as_bot:以 Bot 身份发送消息
  • im:message.group_msg:发送群消息
  • im:chat:访问会话
  • im:resource:发送图片、文件等富媒体内容
  • contact:user.base:readonly:读取用户基础信息,支持 @ 用户

按需添加的权限

如果您希望机器人接收用户消息,建议继续添加以下权限:

  • im:message:readonly:读取消息内容
  • im:message.p2p_msg:readonly:读取私信
  • im:message.group_at_msg:readonly:读取群内 @Bot 的消息
  • im:chat.access_event.bot_p2p_chat:read:接收 Bot 私聊事件推送

提示: 如果您当前只需要让 StoreClaw 主动发消息到群,先配置基础消息权限也可以;如需完整双向对话,再补充消息读取与事件相关权限。

第五步:配置事件与回调

  1. 打开应用左侧菜单中的 事件与回调 相关页面。
  2. 点击订阅方式后的铅笔图标
  3. 事件接收方式选择 使用长连接接收事件

Feishu Event Configuration

  1. 回调事件中添加以下项目:

    • reaction.created
    • reaction.deleted
    • Message received

Feishu Event Added

说明: 长连接方式更适合当前这类 Bot 场景,配置简单,也不需要额外准备公网回调地址。

第六步:发布审批(如需)

如果您的企业启用了应用审批流程,需要先创建发布版本并完成审批:

  1. 点击左侧 版本管理与发布
  2. 点击 创建版本Feishu Create Version
  3. 填写版本说明并提交。 Feishu Version Confirm
  4. 等待企业管理员审批通过。

注意: 如果您的企业未开启审批流程,这一步可以跳过。

审批成功后,您通常就可以在飞书助手中找到该应用,并发起会话。

Feishu Open App

第七步:获取凭证

  1. 点击左侧菜单 凭证与基础信息
  2. 应用凭证 区域复制以下两项:

    • App ID
    • App Secret

这两项信息需要填写到 StoreClaw 的飞书配置页面中。

Feishu Credentials

在 StoreClaw 中完成配置

  1. 回到 StoreClaw,打开 消息渠道 页面。
  2. 找到 Feishu Bot 卡片并点击 配置
  3. 填入刚才复制的 App IDApp Secret
  4. 保存后,若卡片显示已连接状态,则说明配置成功。

接下来,您就可以在飞书中与 StoreClaw 的 AI 发起对话。

连接后能做什么

完成连接后,您可以:

  • 在飞书私聊或群聊中与 StoreClaw Bot 对话
  • 在频道中 @ Bot 发送任务或问题
  • 将定时任务执行结果推送到飞书群或指定会话

常见问题 (FAQ)

Q:登录开放平台后看不到 Developer Console(开发者后台)?

A: 请确认当前账号已加入飞书企业,且企业管理员已为您开通开发者权限。

Q:创建应用后,Bot(机器人)消息发不出去怎么办?

A: 请重点检查以下几项:

  • 第三步中的 Bot 能力是否已经启用;
  • 第四步中的权限是否已经保存;
  • 如果企业启用了审批流程,第六步是否已经审批通过。

Q:App Secret(应用密钥)泄露了怎么办?

A: 请前往 Credentials(凭证) 页面点击 Reset 重置 Secret。重置后,旧 Secret 会立即失效,您需要同步更新 StoreClaw 中的配置。