All Products
Search
Document Center

:Integrate the AI assistant service with Feishu

Last Updated:Oct 09, 2026

Create a Feishu app

  1. Go to the Feishu Open Platform or the Lark Open Platform. Click Create Custom Enterprise App, enter the app name and description, select an app icon, and click Create.

  2. In the left-side navigation pane, click Credentials & Basic Information. Copy the App ID (for example, cli_xxx) and App Secret.

  3. In the left-side navigation pane, click Permissions & Scopes, and then click Bulk Import/Export Permissions. Paste the following JSON configuration, click Next, confirm the New Permissions, and click Request to Activate.

    JSON configuration file

    {
      "scopes": {
        "tenant": [
          "contact:contact.base:readonly",
          "docx:document:readonly",
          "im:chat:read",
          "im:chat:update",
          "im:message.group_at_msg:readonly",
          "im:message.p2p_msg:readonly",
          "im:message.pins:read",
          "im:message.pins:write_only",
          "im:message.reactions:read",
          "im:message.reactions:write_only",
          "im:message:readonly",
          "im:message:recall",
          "im:message:send_as_bot",
          "im:message:send_multi_users",
          "im:message:send_sys_msg",
          "im:message:update",
          "im:resource",
          "application:application:self_manage",
          "cardkit:card:write",
          "cardkit:card:read"
        ],
        "user": [
          "contact:user.employee_id:readonly",
          "offline_access",
          "base:app:copy",
          "base:field:create",
          "base:field:delete",
          "base:field:read",
          "base:field:update",
          "base:record:create",
          "base:record:delete",
          "base:record:retrieve",
          "base:record:update",
          "base:table:create",
          "base:table:delete",
          "base:table:read",
          "base:table:update",
          "base:view:read",
          "base:view:write_only",
          "base:app:create",
          "base:app:update",
          "base:app:read",
          "board:whiteboard:node:create",
          "board:whiteboard:node:read",
          "calendar:calendar:read",
          "calendar:calendar.event:create",
          "calendar:calendar.event:delete",
          "calendar:calendar.event:read",
          "calendar:calendar.event:reply",
          "calendar:calendar.event:update",
          "calendar:calendar.free_busy:read",
          "contact:contact.base:readonly",
          "contact:user.base:readonly",
          "contact:user:search",
          "docs:document.comment:create",
          "docs:document.comment:read",
          "docs:document.comment:update",
          "docs:document.media:download",
          "docs:document:copy",
          "docx:document:create",
          "docx:document:readonly",
          "docx:document:write_only",
          "drive:drive.metadata:readonly",
          "drive:file:download",
          "drive:file:upload",
          "im:chat.members:read",
          "im:chat:read",
          "im:message",
          "im:message.group_msg:get_as_user",
          "im:message.p2p_msg:get_as_user",
          "im:message:readonly",
          "search:docs:read",
          "search:message",
          "space:document:delete",
          "space:document:move",
          "space:document:retrieve",
          "task:comment:read",
          "task:comment:write",
          "task:task:read",
          "task:task:write",
          "task:task:writeonly",
          "task:tasklist:read",
          "task:tasklist:write",
          "wiki:node:copy",
          "wiki:node:create",
          "wiki:node:move",
          "wiki:node:read",
          "wiki:node:retrieve",
          "wiki:space:read",
          "wiki:space:retrieve",
          "wiki:space:write_only"
        ]
      }
    }
  4. In the left-side navigation pane, click Add Application Capability, select the Add by Capability tab, find the Bot card, and click Configuration.

    image

  5. Configure event subscriptions.

    1. Return to the DataWorks console and create a DataClaw instance. For details, see AI assistant service configuration guide.

    2. In the left-side navigation pane of the Feishu Open Platform, click Events & Callbacks. On the Event Configuration tab, click Subscription Method, select Use Long Connection to Receive Events, and click Save.

    3. On the event configuration page, click Add Event, select the "Subscribe as App" tab, search for "message", select the "Receive Messages", "Message Reacted", and "Message Reaction Removed" events, and click "Confirm".

  6. On the Version Management & Release page, create a version, enter the App Version and Update Description, click Save, and then submit the app for review and publish it.

Configure the bot

You can create a group chat or add the bot to an existing group chat. Mention @Bot in the Feishu group to chat with the bot, or find the bot through search and start a private chat to test it.

To use the bot in an external group, see Enable bots for external groups and private chats with external users.
  1. Add the bot by following this path: ··· > Configure > Group Bot > Add Bot.

  2. Click the bot's avatar and click Send Message to send a private message to the bot. To send a message to the bot in a group, mention @Bot.