Feishu DM Sender

v1.0.0

Proactively send messages to Feishu (Lark) users or group chats from your OpenClaw agent. Supports name-based lookup from DM contacts config, open_id, and ch...

0· 147·0 current·0 all-time
by黄耀武@lingzuer

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for lingzuer/feishu-dm-sender.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Feishu DM Sender" (lingzuer/feishu-dm-sender) from ClawHub.
Skill page: https://clawhub.ai/lingzuer/feishu-dm-sender
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install feishu-dm-sender

ClawHub CLI

Package manager switcher

npx clawhub@latest install feishu-dm-sender
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description promise (proactively send Feishu messages) aligns with the code and SKILL.md. The script implements tenant token retrieval and message sending to open.feishu.cn and supports contact-label lookup from the OpenClaw config as described.
Instruction Scope
SKILL.md instructions are scoped to configuring Feishu in openclaw.json, adding DM mappings, and running the included script. The runtime script only reads ~/.openclaw/openclaw.json and performs API calls to open.feishu.cn; it does not read other system files or transmit data to third-party endpoints.
Install Mechanism
No install spec; this is an instruction-only skill plus a small Python script that uses only the standard library. No downloads or archive extraction are performed.
Credentials
The script reads ~/.openclaw/openclaw.json to obtain the Feishu appId/appSecret and dms mapping. That access is proportionate to the stated purpose, but it does require the file to contain valid Feishu credentials — ensure the config does not contain other secrets you don't want accessed by a skill. The skill does not request unrelated environment variables.
Persistence & Privilege
The skill does not request always:true or any elevated platform privileges and does not modify other skills' configs. It runs on demand and only performs API calls to Feishu.
Assessment
This skill appears to do exactly what it claims: send messages via Feishu using credentials stored in ~/.openclaw/openclaw.json. Before installing, verify that the source is trusted (source is listed as unknown), confirm that your openclaw.json holds only the intended Feishu app credentials (and not other sensitive tokens), and make sure the Feishu appId/appSecret you supply are scoped appropriately for sending messages. If you are uncomfortable giving the skill access to your config file, review the script locally before installing; the code is short and uses only the standard library and the official open.feishu.cn API.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

✉️ Clawdis
latestvk97082adhjgwzjpgyfga0xgc09834mce
147downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

飞书发送消息 Skill / Feishu Send Message

让 OpenClaw Agent 主动给飞书(Lark)用户或群聊发送文本消息。

为什么需要这个 Skill?

OpenClaw 内置的 feishu_chat 工具只支持查询群信息和成员列表,不能主动发消息给其他用户。 这个 Skill 补充了这个能力 — Agent 可以通过命令行脚本向任何已授权的飞书用户或群聊发送消息。

典型场景:

  • 定时任务完成后通知指定同事
  • 竞品分析/舆情报告生成后推送给相关人
  • Agent 之间通过飞书协作通知

安装

clawhub install feishu-send-message

或手动复制到 ~/.openclaw/workspace/skills/feishu-send-message/

配置(首次使用前必读)

1. 确保飞书插件已启用

你的 openclaw.json 中需要有飞书 channel 配置:

"channels": {
  "feishu": {
    "accounts": {
      "default": {
        "appId": "your_app_id",
        "appSecret": "your_app_secret"
      }
    }
  }
}

2. 添加联系人映射

在飞书 account 配置中添加 dms 字段,这样 Agent 就能用姓名发消息:

"dms": {
  "ou_xxxxxx": { "label": "张三" },
  "ou_yyyyyy": { "label": "李四" }
}

3. 如何获取正确的 open_id

重要:飞书的 open_id 是按应用隔离的,每个飞书应用看到的同一用户 open_id 不同。

获取方法:

  1. 让目标用户在飞书中找到你的 OpenClaw 机器人,发送任意一条消息
  2. 查看日志 ~/.openclaw/logs/gateway.log,找到:
    Feishu[default] DM from ou_xxxxxx: 你好
    
  3. 这个 ou_xxxxxx 就是该用户在你的应用下的正确 open_id

使用方法

按姓名发送(推荐)

python3 {baseDir}/scripts/send.py --to "张三" --text "报告已生成,请查收"

按 open_id 发送

python3 {baseDir}/scripts/send.py --to "ou_xxxxxx" --text "你好"

发送到群聊

python3 {baseDir}/scripts/send.py --to "oc_xxxxxx" --text "大家好,以下是今日简报"

查看已配置的联系人

python3 {baseDir}/scripts/send.py --list-contacts

指定 ID 类型(高级)

python3 {baseDir}/scripts/send.py --to "on_xxxxxx" --id-type union_id --text "消息内容"

支持的 ID 类型:open_id(默认)、chat_iduser_idunion_id

输出格式

脚本输出 JSON,方便 Agent 解析。

成功:

{
  "success": true,
  "to": "ou_xxxxxx",
  "to_label": "张三",
  "message_id": "om_xxxxxx",
  "chat_id": "oc_xxxxxx"
}

失败:

{
  "success": false,
  "to": "ou_xxxxxx",
  "to_label": null,
  "error_code": 99992361,
  "error_msg": "open_id cross app"
}

前提条件

  1. 飞书插件已配置openclaw.json 中有飞书 appId 和 appSecret
  2. 收件人已授权 — 目标用户必须先给机器人发过至少一条消息(飞书平台要求)
  3. Python 3 — 脚本使用纯标准库,无需 pip install

常见错误

  • 99992361 open_id cross app — 使用了其他飞书应用的 open_id,必须用当前应用下的(参考上方「如何获取正确的 open_id」)
  • 230001 bot not in chat — 机器人无权给该用户发消息,让用户先给机器人发一条消息即可
  • 230002 invalid content — 消息内容为空或格式错误

安全说明

  • 脚本从 ~/.openclaw/openclaw.json 读取飞书应用凭证,不需要额外配置环境变量
  • 不会存储或转发消息内容
  • 仅调用飞书开放平台官方 API (open.feishu.cn)

Comments

Loading comments...