Skip to content

Feishu Integration Guide

This guide will help you configure a Tencent WorkBuddy bot in Feishu (Lark), so you can remotely control Tencent WorkBuddy on your computer to complete tasks anytime, anywhere.

Prerequisites

Before you begin, make sure you have:

  • Tencent WorkBuddy installed on your computer with the Claw remote control feature enabled
  • A Feishu enterprise account with permission to create apps

Step 1: Create a Feishu App

Log in to the developer console

Open your browser and go to the Feishu Open Platform. Log in with your enterprise account, then click Create Enterprise Self-Built App.

Fill in app information

In the creation dialog, fill in the following fields:

FieldDescription
App nameA recognizable name, e.g. "Tencent WorkBuddy Assistant"
App descriptionA brief description of the app's purpose
App iconUpload an icon for the app

Click Create when done. You will be automatically redirected to the app details page.

Step 2: Add Bot Capability

On the app details page, find the Add App Capability section. Locate the Bot card and click Add.

Step 3: Configure App Permissions

The bot needs certain permissions to send and receive messages.

Go to Permission Management

In the left sidebar of the app details page, click Permission Management, then select Batch Import / Export Permissions.

Import permissions

In the dialog that appears:

  1. Clear all existing content in the input box.
  2. Copy and paste the full permission list below.
  3. Click Confirm Add Permissions.

Permissions to import:

json
{
  "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"
    ]
  }
}

Wait a few seconds — the page will confirm the permissions have been added.

Step 4: Get App Credentials

App ID and App Secret

In the left sidebar, click Credentials & Basic Info. You will find two important credentials:

  • App ID: The unique identifier for your app.
  • App Secret: The app secret key (click to reveal).

Important: Keep your App Secret secure. Do not share it with others.

Encrypt Key and Verification Token

In the left sidebar, click Events & Callbacks, then go to the encryption settings. Click the refresh button to auto-generate, or click the edit button to set custom values for your Encrypt Key and Verification Token.

Important: Keep your Encrypt Key and Verification Token secure.

Step 5: Configure Feishu in Tencent WorkBuddy

Fill in credentials

In Tencent WorkBuddy, click your avatar in the top-left corner, then go to Settings → Claw Settings. Find Feishu Integration and click to configure.

Enter the App ID, App Secret, and Encrypt Key in the corresponding fields.

Two connection modes are available:

  • WebSocket Long Connection — Recommended for personal/home/office users without a public IP. Simpler to configure, no public address required.
  • URL Callback — For users with a server and public IP. Requires entering the generated Webhook URL back into the Feishu Open Platform.

Register

  • WebSocket Long Connection: Click Register. When connected successfully, the status will show Connected.
  • URL Callback: Click Register to generate a Webhook URL. Copy and save it — you will need it in the next step.

Step 6: Configure Feishu Event Callbacks

Set up event subscription

Return to the Feishu Open Platform and go to the app details page. In the left sidebar, click Events & Callbacks.

  • WebSocket Long Connection: Under Subscription Method, select Receive events via long connection, then click Verify. When successful, it will display Connection Successful.
  • URL Callback: Under Subscription Method, select Send events to developer server, paste the Webhook URL from the previous step, and click Save.

Add message receive event

In the Event Configuration section, click Add Event, then search for and add the Receive Message event.

Configure card callback

  1. Switch to the Callback Configuration tab.
  2. Search for Card Interaction Callback.
  3. Click Confirm Add.

Step 7: Publish the App

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

Create a version

Click the Create Version button at the top of the page. In the dialog, fill in:

FieldExample
Version number1.0.0
Version descriptionInitial release, Tencent WorkBuddy integration

Click Confirm to create the version.

Publish the version

After creation, click the Publish button next to the version.

Tip: If you are an enterprise admin, the app is usually approved automatically. If approval is required, contact your enterprise admin.

Step 8: Start Using

Find the bot

In Feishu, use the search bar to search for the bot's name.

Start a conversation

Click the bot to open a chat window, or click Open App to begin.

Send a task

Send your request directly, for example: "Help me build a to-do app." Tencent WorkBuddy will execute the task on your computer and return the results in Feishu.

Congratulations! You have successfully connected Tencent WorkBuddy to Feishu. You can now remotely control Tencent WorkBuddy from Feishu anytime, anywhere.


Troubleshooting

Bot not responding

  1. Check app status: Confirm the app has been published successfully.
  2. Check Tencent WorkBuddy: Make sure Tencent WorkBuddy is running and the Claw service is active.
  3. Check Webhook: Confirm the Webhook URL is configured correctly.
  4. Check permissions: Make sure all required permissions have been imported.

Not receiving messages

  1. Confirm the Receive Message event has been added.
  2. Confirm the Card Interaction Callback has been configured.
  3. Verify the Webhook URL in the event subscription is correct.