All Products
Search
Document Center

PolarDB:Integrate a Feishu bot with PolarDB Agent Express

Last Updated:Jun 24, 2026

PolarDB Agent Express allows you to interact with its AI assistant through a Feishu bot. After you create a Feishu app, configure event callbacks, and grant the required permissions, you can use the AI assistant in PolarDB Agent Express directly within Feishu.

Process overview

To integrate a Feishu bot with PolarDB Agent Express, follow these steps:

  1. Create a Feishu app and obtain its credentials.

  2. Configure the Feishu channel in PolarDB Agent Express.

  3. Configure event callbacks and publish the app in Feishu.

Create a Feishu app

  1. Log on to the Feishu Open Platform and click developer console in the upper-right corner. On the console page, click Create a custom app. Enter the App Name, App Description, and App Icon, and then click Create.

  2. Go to the app management page, find the Bot capability, and click Add.

  3. In the left-side navigation pane, click permission management. Click Bulk Import/Export Permissions. On the Import tab, paste the following JSON permission description, click Next, Confirm New Permissions, and then click Apply for Activation.

    {
      "scopes": {
        "tenant": [
          "aily:file:read",
          "aily:file:write",
          "application:application.app_message_stats.overview:readonly",
          "application:application:self_manage",
          "application:bot.menu:write",
          "cardkit:card:write",
          "contact:contact.base:readonly",
          "contact:user.employee_id:readonly",
          "corehr:file:download",
          "docs:document.content:read",
          "event:ip_list",
          "im:chat",
          "im:chat.access_event.bot_p2p_chat:read",
          "im:chat.members:bot_access",
          "im:message",
          "im:message.group_at_msg:readonly",
          "im:message.group_msg",
          "im:message.p2p_msg:readonly",
          "im:message:readonly",
          "im:message:send_as_bot",
          "im:resource",
          "sheets:spreadsheet",
          "wiki:wiki:readonly"
        ],
        "user": [
          "aily:file:read",
          "aily:file:write",
          "im:chat.access_event.bot_p2p_chat:read"
        ]
      }
    }
  4. Go to the Credentials & Info page. Copy the App ID and App Secret. You will need these credentials to configure PolarDB Agent Express.

Configure the Feishu channel for PolarDB Agent Express

Add credentials from your Feishu app to PolarDB Agent Express. This lets PolarDB Agent Express connect to your Feishu bot.

  1. Log on to the PolarDB console and navigate to the management page for your PolarDB Agent Express app.

  2. Under Channel Configuration, enable the Feishu channel. Enter the Bot App Key and App Secret that you obtained in the previous step, and then click Save.

    Important

    Saving this configuration triggers PolarDB Agent Express to refresh its settings and restart. This process takes about two minutes.

Configure event callbacks

Configure the event subscription and callback settings for your Feishu app so the bot can receive user messages.

  1. Log on to the Feishu Open Platform, click developer console in the upper-right corner, and go to your app. In the left-side navigation pane, click Events & Callbacks. On the Event Configuration tab, for Subscription Method, select long connection and click Save.

  2. On the Event Configuration tab, under Added Events, add and confirm the Receive Message event.

  3. On the Callback Configuration tab, under Subscription Method, set the app to receive callbacks by using a long connection, and then click Save.

Publish the Feishu app

After you complete the configuration, publish the app to apply the changes. In the left-side navigation pane, click Version Management & Release. In the upper-right corner, click Create New Version. Enter the version number and update notes, and then click Save at the bottom of the page to publish the version.

Add and verify the bot

You can add the bot to a new or existing group chat, or interact with it through a direct message to verify that it works correctly.

  • Go to the Feishu group settings page and click Group Bot. On the bot management page, click Add in the upper-right corner. In the search box, enter the name of your bot, select it from the results, and click Add.

  • To interact with the bot, @mention it in a group chat or start a direct message. You can find the bot by searching for its name in Feishu or on the Features page.