SuperAPI AI Directory

dingtalk-workflow-knowledge-base

Office & productivity

View repository

Updated 10-16 00:00

About this skill

Personal Knowledge Base (dingtalk-workflow-knowledge-base)

Send a link via chat, and AI automatically scrapes it to generate a summary and tags, stores them in the DingTalk AI Table index, and supports natural language search and content association analysis. Compared with the Feishu version, DingTalk has no knowledge base (wiki) or cloud document creation capability, so aitable is used instead as the knowledge index table to store summaries and original links.

Trigger Methods

"知识库"  "保存文章"  "搜索知识库"  "之前保存过"  "知识管理"  "收藏这篇文章"

Supported Content Formats

Format Description Processing Method
Article Webpage Ordinary webpage article WebSearch/web_reader scrapes the body text
YouTube Video YouTube link Extract title and description
Twitter/X Post Post link Scrape the full thread
PDF PDF link Download and parse the content
Official Account Article WeChat Official Account link WebSearch scraping
Zhihu Answer Zhihu link WebSearch scraping
Other Any URL WebSearch attempts scraping

Data Initialization

On first use, automatically create the aitable data table:

# 创建 Base
dws aitable base create --name "个人知识库" --yes -f json
# 返回 baseId,记为 <kb-base-id>

# 创建知识索引表
dws aitable table create --base-id <kb-base-id> --name "知识索引" --yes -f json
# 返回 tableId,记为 <kb-table-id>

# 添加业务字段(表创建后自动带一个"标题"primaryDoc字段,需额外添加业务字段)
dws aitable field create --base-id <kb-base-id> --table-id <kb-table-id> --fields '[{"fieldName":"URL","type":"text"},{"fieldName":"内容类型","type":"text"},{"fieldName":"来源平台","type":"text"},{"fieldName":"标签","type":"text"},{"fieldName":"摘要","type":"text"},{"fieldName":"关键观点","type":"text"},{"fieldName":"保存时间","type":"date"},{"fieldName":"关联条目","type":"text"}]' --yes -f json

Table Structure: Knowledge Index (kb_index)

Field Name Type Description
Title Text Content title
URL Text Original link
Content Type Text Article/Video/Post/PDF/Podcast/Other
Source Platform Text Website/YouTube/Twitter/Official Account/Zhihu/Other
Tags Text AI-generated automatically, comma-separated
Summary Text Summary within 200 characters
Key Points Text Core viewpoints, separated by line breaks
Save Time Date Time stored
Related Entries Text Titles of related entries, comma-separated

Work Modes

Mode 1: Single Save

Trigger: "Help me save this article https://..." / "Bookmark this link"

Workflow:

Step 1: 抓取网页内容
├── 使用 web_reader / WebSearch 获取文章内容
└── 提取标题、正文、发布时间

Step 2: AI 处理
├── 生成 200 字以内摘要
├── 提取 3-8 个标签(中英文关键词)
├── 提取 2-5 个关键观点
├── 判断内容类型和来源平台
└── 去重检查(按 URL 和标题比对)

Step 3: 检查关联内容
└── dws aitable record query --base-id <kb-base-id> --table-id <kb-table-id> --keyword "<标签>" --yes -f json
    → AI 比对标签重叠度,找出关联条目

Step 4: 写入知识库
└── dws aitable record create --base-id <kb-base-id> --table-id <kb-table-id> --records '[{"cells":{...}}]' --yes -f json

Output Format:

## 知识库入库报告

标题:2026年AI行业十大趋势
来源:https://example.com/ai-trends-2026
类型:文章 | 平台:网站

标签:AI、趋势、2026、行业分析、大模型
摘要:本文分析了2026年AI行业的十大发展趋势...

关联发现:你之前保存过《大模型成本下降分析》,从另一个角度讨论了AI行业。

✓ 已保存到知识库。

Mode 2: Batch Save

Trigger: "Save all these links" + multiple URLs

Workflow:

Step 1: 解析所有 URL

Step 2: 并行抓取(使用 Agent 并行抓取多个网页)

Step 3: AI 统一处理
├── 为每条内容生成摘要、标签、关键观点
├── 批量去重检查
└── 批量写入

Step 4: 输出批量入库报告

Mode 3: Knowledge Search

Trigger: "What articles are there about AI chips?" / "Have I saved anything about XX before?"

Workflow:

Step 1: 解析搜索意图(关键词提取)

Step 2: 查询知识库
└── dws aitable record query --base-id <kb-base-id> --table-id <kb-table-id> --keyword "<关键词>" --limit 20 --yes -f json

Step 3: AI 语义匹配和排序(不仅匹配标签,还匹配摘要和标题)

Step 4: 格式化输出

Output Format:

## 知识库搜索结果

找到 N 条相关内容:

1. AI芯片市场竞争格局分析(2026-03-15 保存)
   标签:AI、芯片、GPU、竞争
   摘要:分析了Nvidia、AMD、Intel在AI芯片市场的竞争态势...
   原文:https://...

2. 国产AI芯片突围之路(2026-03-08 保存)
   标签:AI、芯片、国产替代
   摘要:探讨了中国AI芯片产业的技术路线和商业化进展...
   原文:https://...

Mode 4: Association Discovery

Trigger: Automatic (when saving new content) / "See what related articles there are"

Workflow:

Step 1: 获取新内容的标签列表

Step 2: 用每个标签搜索知识库
└── dws aitable record query --keyword "<标签1>" --yes -f json
└── dws aitable record query --keyword "<标签2>" --yes -f json

Step 3: AI 计算关联度(标签重叠度 + 摘要语义相似度)

Step 4: 更新关联条目字段
└── dws aitable record update --records '[...]' --yes -f json

Mode 5: Knowledge Statistics

Trigger: "How much content is in the knowledge base?" / "What was saved recently?"

Workflow:

Step 1: 查询所有记录
└── dws aitable record query --base-id <kb-base-id> --table-id <kb-table-id> --limit 100 --yes -f json

Step 2: AI 统计分析
├── 总条目数
├── 按类型分布(文章/视频/推文...)
├── 按平台分布
├── 热门标签 TOP 10
└── 最近保存的 5 条

dws CLI Command Reference

Create Knowledge Base

dws aitable base create --name "个人知识库" --yes -f json
dws aitable table create --base-id <kb-base-id> --name "知识索引" --yes -f json
dws aitable field create --base-id <kb-base-id> --table-id <kb-table-id> --fields '[{"fieldName":"URL","type":"text"},{"fieldName":"内容类型","type":"text"},{"fieldName":"来源平台","type":"text"},{"fieldName":"标签","type":"text"},{"fieldName":"摘要","type":"text"},{"fieldName":"关键观点","type":"text"},{"fieldName":"保存时间","type":"date"},{"fieldName":"关联条目","type":"text"}]' --yes -f json

Save Knowledge Entry

dws aitable record create --base-id <kb-base-id> --table-id <kb-table-id> --records '[{"cells":{"标题":"文章标题","URL":"https://...","内容类型":"文章","来源平台":"网站","标签":"AI,趋势,2026","摘要":"200字摘要","关键观点":"观点1\\n观点2","保存时间":"2026-04-06","关联条目":"关联文章1"}}]' --yes -f json

Search Knowledge Base

dws aitable record query --base-id <kb-base-id> --table-id <kb-table-id> --keyword "AI芯片" --limit 20 --yes -f json

Query All (for statistics)

dws aitable record query --base-id <kb-base-id> --table-id <kb-table-id> --limit 100 --yes -f json

Update Related Entries

dws aitable record update --base-id <kb-base-id> --table-id <kb-table-id> --records '[{"recordId":"rec_xxx","cells":{"关联条目":"关联文章1,关联文章2"}}]' --yes -f json

Send Save Notification to Group

dws chat message send-by-bot --robot-code "bot_code" --group "openConversationId" --title "知识库更新" --text "已保存:文章标题\n摘要:..." --yes

Linked Skill

Linked Skill Data Interaction Description
content-pipeline Search Knowledge Base to check for duplicate topics Idea pipeline avoids duplicate content
business-advisor Provide Knowledge Base Data Advisory group analyzes industry trends
social-tracker Save social media research reports Track and store analysis reports

Notes

  1. All dws commands must include the --yes flag
  2. --records The parameter must be in JSON array format; pay attention to escaping
  3. Content scraping depends on WebSearch/web_reader; some websites may not be scrapable
  4. Keep summaries within 200 characters, and key points within 5 items
  5. Use a mix of Chinese and English for tags to facilitate search matching
  6. Do not save the same URL repeatedly; before saving, compare by URL and title for deduplication
  7. DingTalk has no document creation CLI, so full content cannot be saved as a DingTalk document; only summaries and links are saved
  8. aitable record query of the --keyword parameter supports fuzzy search by field value
  9. Created aitable bases will not be automatically cleaned up; you can use aitable base list to view all bases

Known Issues

No known issues; all core commands (base CRUD, table CRUD, record CRUD, query) have passed testing