Embedding BI Visual Charts into Feishu Docs
Prerequisites
-
Complete the integration setup between Guandata and Feishu in both management consoles. For details, see [Guandata Feishu Integration Configuration Steps](../../9-Management%20Center%20(Administration%20and%20Operations)%2F6-System%20Open%20%26%20Integration%2F1-Common%20Office%20OA%20Integration%20Solutions%2F2-Feishu%20Full%20Integration%20Solution.md#3.1%20"Feishu Open Platform - Developer Console" Create Guandata BI App).
-
Guandata BI platform must enable HTTPS to be embedded in Feishu Docs; an operations engineer must also modify the config file to enable cross-site configuration for proper embedding.
- File: /home/guandata/Development/guandata-web/guandata-web-configmap.yaml
{"CROSS_SITE_HEADER_TOKEN_ENABLED": true}
{"COOKIE_ATTRIBUTES": {"sameSite": "none"}}
- File: /home/guandata/Development/guandata-web/guandata-nginx-configmap.yaml
- Add to root:
proxy_cookie_path / "/; Secure";
Steps
1. Get Guandata Platform Feishu Integration Link
- Get the link
- Dashboard: In Guandata BI "Data Analysis", click the dashboard's top right "More > Share Link", then the "Feishu Integration Link" tab to get the dashboard's Feishu link.
- Card: In "Data Analysis", click the card's top right "...", then "Feishu Integration Link" to get the card's Feishu link.
- Click "Copy Link" for later use in Feishu Docs.
Note:
- If the card is being filtered by other cards or filters, a "Apply Current Filter" checkbox appears below the link. If you want to embed a card with filters in Feishu Docs, check this box.
- Dashboards do not support carrying filter conditions.

2. Insert BI Visual Card or Dashboard into Feishu Docs
You can insert BI visual cards or dashboards into Feishu Docs for mixed text and chart reports in two ways.
Method 1: Directly Insert Link
In Feishu Docs, insert the link and select "Preview View"; users can view the chart details directly in the Feishu client/browser.

Note: With this method, embedded blocks can be viewed normally in Feishu client/browser on PC; on some iOS/Android clients, due to browser security, SSO login may not work.
Type | Description | Illustration |
---|---|---|
PC Client | SSO login on first use | ![]() |
PC Browser | Manual auth on first use | ![]() ![]() |
Some Mobile | SSO login not available | ![]() |
Method 2: Insert Link via Guandata Widget
Prerequisite:
The "Doc Widget" must be installed in Feishu Admin. See [Doc Widget Installation Process](#Doc Widget Installation Process).
Steps:
- Add the "Guandata" widget.
In the editor, click the + on the left, find "Guandata" in "Doc Widgets > More Widgets", and click "Add".
Note: The first time a doc editor uses the widget, this step is needed; after that, it can be used directly.

-
Insert the Guandata widget in two ways:
- In the editor, click the + on the left, find "Guandata" in "Doc Widgets" and click.
- Type
/Guandata
in the editor, and the widget will pop up; click to use.
- In the editor, click the + on the left, find "Guandata" in "Doc Widgets" and click.
-
Paste the copied link and click "Confirm"; the card or dashboard preview will be shown. Users can view chart details directly in Feishu client/browser.
Note: With this method, embedded blocks can be viewed with SSO login in both PC and mobile Feishu clients/browsers.
3. View Inserted Result
If "Apply Current Filter" was checked when copying the link, the card in Feishu Docs will show the filter condition in the top left.
Filters can be reset, and work the same as in Guandata.

Doc Widget Installation Process
-
Create Doc Widget
In Feishu Admin, select "Add App Capability > Doc Widget", click "Add".
Note: Must be created under the Feishu app bound to Guandata backend, or SSO login will not work.
-
Install the widget locally
If you have installed the developer tool, runnpm uninstall @bdeefe/opdev-cli -g
to clean up, then use the installer to avoid path conflicts.
Node.js is required. See Node.js, npm is installed with Node.js.npm install @lark-opdev/cli@latest -g
-
Login via CLI
- Run
opdev login
, select Feishu. - After login, run
opdev login
again. - If you see the following, login is successful:
- Run
Note: Steps 2, 3 refer to Feishu docs: 02 Quick Start
-
Download the installer
Download: https://guandata-tool.oss-cn-shanghai.aliyuncs.com/1.0.0.zip -
Edit the appid (Feishu app id) and blockTypeID (doc widget id) in the files
- Get APP ID and BlockTypeID from Feishu Admin.
- Add APP ID to /dist/project.config.json; add BlockTypeID to /dist/index.json.
- Get APP ID and BlockTypeID from Feishu Admin.
-
Upload the installer
In the console, go to the installer directory, runopdev upload ./dist
, enter version and description as prompted. -
Edit in Admin
- In "App Capability > Doc Widget", edit and save the widget info.
- In "Security Settings > Server Domain Whitelist", add the BI access address as a whitelist.
- In "Dev Config > Permission Management", add widget API permissions: [Create and Edit New Docs], [View New Docs].
- In "App Capability > Doc Widget", edit and save the widget info.
-
Publish App Version
In "App Release > Version Management and Release", publish the app version.
-
Add Widget in Docs
In the doc add menu, find "More Widgets > Company Built", click "Add" (each user needs to add once, then can use in all docs).