home / skills / openclaw / skills / feishu-article-collector

feishu-article-collector skill

/skills/budingsoft/feishu-article-collector

This skill automatically collects articles from Toutiao and WeChat, generates AI summaries and categories, and stores results in Feishu multidimensional sheets.

npx playbooks add skill openclaw/skills --skill feishu-article-collector

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
2.3 KB
---
name: feishu-article-collector
version: 1.2.0
description: |
  自动收集今日头条、微信公众号文章。抓取正文,AI 生成总结和分类,存入飞书多维表格。支持去重。
metadata:
  openclaw:
    emoji: "📰"
    requires:
      bins:
        - python3
      env:
        - FEISHU_APP_ID
        - FEISHU_APP_SECRET
        - DEEPSEEK_API_KEY
    primaryEnv: FEISHU_APP_ID
    install:
      - kind: uv
        package: requests
---

# 飞书文章收集器

收到包含今日头条或微信公众号链接的消息时,自动抓取文章、AI 总结、分类并存入飞书多维表格。

## 触发条件

当消息中包含以下域名的链接时,立即执行本技能:

- `toutiao.com`、`toutiaocdn.com`、`toutiao.io`、`snssdk.com`(今日头条)
- `mp.weixin.qq.com`(微信公众号)

## 处理方式

使用 exec 工具调用脚本,一步完成所有处理:

```bash
python3 {baseDir}/scripts/collect.py '完整的消息文本'
```

参数说明:
- 第一个参数:用户发送的完整消息文本(包含链接和其他文字)

脚本返回 JSON 结果:

成功:
```json
{"success": true, "title": "文章标题", "category": "分类", "summary": "总结", "record_id": "xxx"}
```

重复:
```json
{"success": false, "error": "该文章已收录,跳过重复链接", "url": "..."}
```

## 回复格式

根据脚本返回结果回复用户:

成功时:
> 已收录:《文章标题》
> 分类:xxx
> 总结:xxx

重复时:
> 该文章已收录,无需重复保存

失败时:
> 收录失败:错误原因

## 重要:必须调用脚本

- **严禁使用 web_fetch 抓取文章**,必须调用上面的 Python 脚本
- 脚本已内置抓取、总结、分类、写入的全部逻辑,不需要自己做任何处理
- 消息文本原样传入第一个参数,不需要自己提取 URL
- 如果脚本执行失败,将错误信息返回给用户即可

## 安装后配置

在 OpenClaw 的 `openclaw.json` 中配置环境变量:

```json
{
  "env": {
    "FEISHU_APP_ID": "飞书自建应用 App ID",
    "FEISHU_APP_SECRET": "飞书自建应用 App Secret",
    "DEEPSEEK_API_KEY": "DeepSeek API Key"
  }
}
```

飞书应用需开通 `bitable:app` 权限。多维表格会在首次使用时自动创建。

Overview

This skill automatically collects articles from Toutiao and WeChat public accounts, extracts full text, and stores structured records in a Feishu (Lark) multi-dimensional table. It uses an existing Python script to perform fetching, AI summarization, categorization, deduplication, and insertion. The skill replies to the user with concise status messages after processing.

How this skill works

When a message contains links to supported domains (Toutiao or mp.weixin.qq.com), the skill invokes a bundled Python script and passes the original message text as a single argument. The script handles fetching the article content, generating an AI summary and category, checking for duplicates, and writing the result to a Feishu multi-dimensional table. The skill returns the script's JSON result and formats a brief human-readable reply indicating success, duplication, or error.

When to use it

  • You receive messages that include Toutiao or WeChat public account links.
  • You want automated full-text archiving and AI-generated summaries in Feishu tables.
  • You need deduplication to avoid storing the same article multiple times.
  • You want centralized access to collected articles with category and summary metadata.

Best practices

  • Always pass the full original message text unchanged to the script — do not pre-extract URLs or modify content.
  • Do not attempt to fetch article pages with other tools; rely on the provided Python script to ensure consistent parsing and deduplication.
  • Ensure FEISHU_APP_ID, FEISHU_APP_SECRET, and DEEPSEEK_API_KEY are set in the environment before first use.
  • Grant the Feishu app bitable:app permission so the skill can create and write the multi-dimensional table on first run.
  • Handle script errors by relaying the returned error message directly to the user for debugging.

Example use cases

  • A colleague shares a WeChat article link in a chat; the skill archives the full article, adds a short AI summary, and tags it with a category in Feishu.
  • A group discussion includes a Toutiao link; the skill deduplicates and skips already-stored articles, notifying the sender it was previously collected.
  • Automated ingestion of daily links into a searchable Feishu table for content teams and research archives.
  • Quickly build a centralized knowledge base of public articles with summaries for team review and distribution.

FAQ

Which domains trigger the collector?

Links from Toutiao domains (toutiao.com, toutiaocdn.com, toutiao.io, snssdk.com) and WeChat public accounts (mp.weixin.qq.com) trigger the skill.

Can I modify the fetching or summarization logic?

No. The skill must call the provided Python script which contains the full fetch, summarize, classify, and write logic; do not replace it with other fetch methods.

What happens if the article is already stored?

The script returns a duplicate response; the skill notifies the user that the article is already collected and skips insertion.