Skip to Content
Practical GuidesIM ChannelsFeishu Integration Guide

Feishu Integration Guide

This guide helps you configure a DeepWorks bot in Feishu so you can use Feishu to control DeepWorks on your computer and complete coding tasks from anywhere.

Prerequisites

Before you start, make sure you meet the following requirements:

  • DeepWorks is installed on your computer and the IM Channels remote-control feature is enabled.
  • To create an enterprise bot, you need a Feishu enterprise account with permission to create apps.

Create a Feishu App

Sign In to the Developer Console

Open a browser, go to the Feishu Open Platform , sign in with your enterprise account, and click Create Enterprise Custom App.

This procedure uses an app bot that can send and receive messages. A Webhook notification bot in a group cannot replace this connection method.

Pasted image 20261028171428

Fill In App Information

In the creation dialog, fill in the following information:

FieldDescription
App nameGive the app a name, such as DeepWorks Assistant
App descriptionBriefly describe the app features
App iconUpload an app icon

Pasted image 20261028171454

After completing the fields, click Create.

Open App Details

When the app is created, its details page opens automatically. Click Add App Capability, find the Bot card, and click Add.

Pasted image 20261028171633

Configure Events and Callbacks

In the left menu of the app details page, click Events and Callbacks. Configure the receiving methods for events and callbacks, then add the Receive Message event.

Step 1: Configure the event receiving method

  1. Open the Event Configuration tab and select Use Long Connection to Receive Events for Subscription Method.
  2. Confirm that Connection successful is displayed, then click Save.

Pasted image 20261028174924

Step 2: Configure the callback receiving method

  1. Switch to the Callback Configuration tab and select Use Long Connection to Receive Callbacks for Subscription Method.
  2. Verify the connection status, confirm that Connection successful is displayed, then click Save.

Pasted image 20261028175648

Step 3: Add the receive-message event

  1. Return to the Event Configuration tab and click Add Event in the Added Events area.
  2. Select the Receive Message event (im.message.receive_v1) to add it.
  3. Confirm that the event appears in the list, then enable the permissions required for direct messages and group @mentions as described in chapter 3, Configure App Permissions.

After the event is added, the app can receive user messages within its permission scope, including direct messages sent to the bot and @mentions in group chats.

Pasted image 20261029100729

For more information, see the official Feishu documentation for receiving events over a long connection  and message events .

Configure App Permissions

To let the bot send and receive messages normally, add the required permissions to the app.

Open Permission Management

In the left menu of the app details page, click Permissions.

Pasted image 20261028171752

Search for and configure these permissions:

PermissionPurpose
Receive direct messages im:message.p2p_msg:readonlyReceive direct messages sent by users to the bot
Receive group @mentions im:message.group_at_msg:readonlyReceive messages that @mention the bot in groups
Send messages as the app im:message:send_as_botReply to users or groups
Get basic user informationIdentify users
Get user mobile numbersBoth mobile-number field authorization and the address-book data scope must cover users
Get and upload resources im:resourceHandle images, files, and other resources in messages
Create and update cards cardkit:card:writeRequired for streaming cards

After enabling permissions, follow the Feishu prompts to complete approval and version release. Check both the app availability range and the address-book data scope.

Import Permissions in Batch

For more common permissions, use the list below for batch import.

In the dialog:

  1. Clear everything from the input box.
  2. Copy the complete permission list below and paste it into the box.
  3. Click Confirm to Add Permissions.

Permissions to import:

{ "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:retrieve", "wiki:space:read", "wiki:space:retrieve", "wiki:space:write_only" ] } }

Pasted image 20261028172013

Pasted image 20261028172123

Set the permission access range according to your needs.

Pasted image 20261028172151

Publish the App

The app must be published before it can be used in Feishu.

Create a Version

Click Create Version at the top of the page, then create or update a version on the details page.

Pasted image 20261028172611

Pasted image 20261028172746

Publish the Version

After the version is created, click Publish on its right.

If you are an enterprise administrator or created a personal app, approval is usually automatic. If approval is required, contact your enterprise administrator.

Pasted image 20261028172818

Get App Credentials

In the left menu of the app details page, click Credentials and Basic Information.

The page shows two important credentials:

  • App ID: the app’s unique identifier
  • App Secret: the app key (click to view)

Store App Secret securely and never disclose it to others.

Pasted image 20261028173018

Configure Feishu in DeepWorks

You can scan a QR code with your phone to create or select a Feishu app and connect it, or manually enter the credentials of an existing app.

Prerequisites: Creating an enterprise app requires the corresponding permission. Before connecting, complete the bot capability, subscription method, required permissions, and version release as described above. For enterprise bots, the app availability range, mobile-number authorization, and address-book data scope must cover all users. Check these settings again after scanning the QR code.

Open Bot Configuration

  1. Click your user avatar in the lower-left corner of DeepWorks, select IM Channels, and confirm the workspace to configure.
  2. On the Channel Connections tab, connect your Feishu account. See IM Channels.
  3. Switch to the Bots tab, click Add Bot → Feishu, and open the Create Feishu Bot dialog.

IM Channels V1.4 create Feishu bot

Choose a Connection Method

Method 1: Scan a QR Code

  1. Click One-Click Create Feishu App by QR Code.
  2. In the Feishu Create or Select Bot QR Code dialog, use Feishu on your phone to scan the QR code generated on the current DeepWorks page. Follow the phone prompts to create a bot or select an existing app, then confirm.
  3. When it finishes, the system fills in the app credentials automatically. Return to the creation dialog, check the credentials, and enter or verify Bot Name so it matches the actual bot name.
  4. In the Feishu Open Platform, check the app’s bot capability, subscription method, and permissions listed in chapter 3. Complete the required version release as described in chapter 4.

IM Channels V1.4 Feishu QR-code connection

To obtain a new QR code, click Refresh QR Code. Scan the QR code generated on the actual page, not the sample image in this guide.

Method 2: Enter Credentials Manually

If you already created an app on the Feishu Open Platform, enter the following information directly:

FieldInstruction
Bot NameKeep it consistent with the actual bot name in Feishu.
Client IDEnter the Feishu app’s App ID.
Client SecretEnter the Feishu app’s App Secret.

For how to obtain app credentials, see chapter 5, Get App Credentials. Before connecting, make sure the bot capability, subscription method, app permissions, and version release are complete.

Create and Enable the Bot

  1. Confirm that the bot name and app credentials are complete, turn on Enable Bot, and click Create.
  2. Return to the My Bots list and confirm that the bot has been added and is enabled. Later, use Configure to change its information or the Enable Bot switch to change its status.
  3. Open the bot conversation in Feishu, send a message, and check whether you receive a reply.

After your Feishu account is connected, you can also use a bot already connected by you or someone else without creating it again. If you do not have access, open the Enterprise Bots list, find its creator, and request access.

Start Using It

Find the Bot

In the Feishu search box, search for the bot name you just created.

Start a Conversation

Click the bot to open the conversation, or click Open App to start using it and send a task.

Pasted image 20261029103911

Receive the Message in DeepWorks

Switch to DeepWorks; the message is also received there.

Pasted image 20261029104048