← 返回 Skills 市场
whauff

钉钉 OA 审批工具

作者 whauff · GitHub ↗ · v2.3.2 · MIT-0
cross-platform ✓ 安全检测通过
480
总下载
0
收藏
2
当前安装
4
版本数
在 OpenClaw 中安装
/install dingtalk-approval
功能描述
钉钉 OA 审批处理插件,支持查询待办、查看审批详情、执行同意/拒绝,以及查询假期余额。 **当以下情况时使用此 Skill**: (1) 用户需要查询钉钉 OA 审批待办任务列表 (2) 用户需要执行审批操作(同意或拒绝) (3) 用户提到"钉钉审批"、"OA 审批"、"待办任务"、"审批单据" (4) 用户要...
使用说明 (SKILL.md)

DingTalk Approval (钉钉 OA 审批) SKILL

🚨 执行前必读

  • 查询待办:调用 get_pending_tasks 获取任务列表,返回包含 task_id
  • 执行审批:调用 execute_approval_task 时必须传入从 get_pending_tasks 获取的 task_id
  • ⚠️ 配置要求:需要在 openclaw.json 中配置 dingtalkUserId、appKey 和 appSecret
  • ⚠️ 权限要求:钉钉应用需要开通 OA 审批权限(process 相关 API 权限)

📋 快速索引:意图 → 工具 → 必填参数

用户意图 工具 必填参数 常用可选
查询我的待办审批 get_pending_tasks -
查看审批单详情 get_task_details task_id -
同意某个审批 execute_approval_task task_id, action="AGREE" remark(审批意见)
拒绝某个审批 execute_approval_task task_id, action="REFUSE" remark(拒绝原因)
查询我的假期余额 get_vacation_balance -

🎯 核心工作流程

1. 查询待办任务

调用时机:用户询问"有什么待办"、"我的审批任务"等

工具get_pending_tasks

参数:无

返回示例

1. 请假申请 - 张三 (任务 ID: task_12345)
2. 报销审批 - 李四 (任务 ID: task_67890)
3. 合同审批 - 王五 (任务 ID: task_abcde)

2. 查看审批单详情

调用时机:用户想要了解审批单的详细信息(申请人、申请内容、审批流程等)

工具get_task_details

参数

  • task_id:从 get_pending_tasks 返回中获取的任务 ID

返回示例

📋 **审批单详情**

**单据标题**: 请假申请 - 张三
**申请人**: 张三
**申请时间**: 2026-03-11 10:30:00
**当前状态**: 审批中
**审批类型**: 请假申请

📝 **申请内容**:
- 请假类型:年假
- 请假天数:3 天
- 开始时间:2026-03-15
- 结束时间:2026-03-17
- 请假事由:家庭事务

🔄 **审批流程**:
- ✅ 同意 | 李四(部门经理)| 2026-03-11 11:00:00
- ⏳ 待审批 | 王五(HR)| 

3. 执行审批操作

调用时机:用户明确要求同意或拒绝某个审批

工具execute_approval_task

必填参数

  • task_id:从 get_pending_tasks 返回中获取的任务 ID
  • action"AGREE"(同意)或 "REFUSE"(拒绝)

可选参数

  • remark:审批意见或备注(建议填写,特别是拒绝时)

返回示例

审批成功:已同意任务 task_12345

⚙️ 配置说明

在 openclaw.json 中添加以下配置:

{
  "plugins": {
    "entries": {
      "dingtalk-approval": {
        "config": {
          "dingtalkUserId": "your-dingtalk-user-id",
          "appKey": "your-app-key",
          "appSecret": "your-app-secret"
        }
      }
    }
  }
}

配置项说明

  • dingtalkUserId:钉钉用户 ID(用于执行审批操作)
  • appKey:钉钉开放平台应用的 AppKey
  • appSecret:钉钉开放平台应用的 AppSecret

获取方式

  1. 登录 钉钉开放平台
  2. 创建或选择已有应用
  3. 在"凭证与基础信息"中获取 AppKey 和 AppSecret
  4. 确保应用开通了"OA 审批"相关权限

🔧 工具详细参数

get_pending_tasks

查询当前用户的 OA 审批待办任务列表。

Parameters: 无

Returns: 任务列表字符串,每行包含任务标题和 task_id

错误处理

  • 无待办任务:返回"当前没有待办单据"
  • API 异常:返回具体错误信息

execute_approval_task

执行 OA 审批的同意或拒绝操作。

Parameters:

  • task_id (string, required): 待办任务的唯一 ID(从 get_pending_tasks 获取)
  • action (string, required): 审批动作,枚举值 ["AGREE", "REFUSE"]
  • remark (string, optional): 审批意见/备注

Returns: 成功或失败消息

错误处理

  • task_id 无效:返回 API 错误信息
  • 权限不足:返回权限错误
  • 网络异常:返回连接错误

📝 使用示例

示例 1:查询待办并审批

用户:我有什么待办审批吗?
助手:调用 get_pending_tasks → 返回 3 个待办
助手:您有 3 个待办:
      1. 请假申请 - 张三 (task_12345)
      2. 报销审批 - 李四 (task_67890)
      3. 合同审批 - 王五 (task_abcde)

用户:同意第一个请假申请
助手:调用 execute_approval_task(task_id="task_12345", action="AGREE", remark="同意")
助手:✅ 已同意张三的请假申请

示例 2:拒绝审批并备注

用户:拒绝李四的报销,发票不齐全
助手:调用 execute_approval_task(task_id="task_67890", action="REFUSE", remark="发票不齐全,请补充后重新提交")
助手:❌ 已拒绝李四的报销审批,备注:发票不齐全,请补充后重新提交

示例 3:查询假期余额

用户:帮我查一下还有多少年假
助手:调用 get_vacation_balance
助手:年假: 5天 (总10天, 已用5天)

⚠️ 常见问题

1. 配置加载失败

错误[dingtalk-approval] 配置不完整!

解决:检查 openclaw.json 配置路径是否正确,确保在 plugins.entries.dingtalk-approval.config

2. 获取 token 失败

错误invalid appkey or appsecret

解决:检查 appKey 和 appSecret 是否正确,确认应用状态正常

3. 无权限访问

错误permission denied

解决:在钉钉开放平台为应用添加 OA 审批相关 API 权限

4. task_id 无效

错误invalid task id

解决:确保 task_id 是从 get_pending_tasks 返回的最新数据,任务可能已被处理

5. 假期权限不足

错误应用尚未开通假期查询权限(qyapi_holiday_readonly)

解决:在钉钉开放平台为当前应用申请 qyapi_holiday_readonly 权限后重试


🔗 相关资源


Author

Yang

License

MIT

安全使用建议
This plugin appears to do exactly what it claims: call DingTalk OA APIs to list tasks, show details, and approve/refuse items. Before installing: (1) ensure the appKey/appSecret are provisioned to an app with the minimum required permissions (only OA/process and any needed read-only scopes); (2) store credentials securely (use environment variable substitution or secret storage instead of committing appSecret in plain openclaw.json); (3) limit the configured dingtalkUserId to an account with appropriate authority (consider using a dedicated service account); (4) be aware the plugin can perform destructive actions (approve/refuse), so test in a non-production environment first and review audit logs in DingTalk. The only minor inconsistency: registry metadata shows no required env vars while the plugin requires config entries—this is explained by the plugin reading openclaw.json rather than platform env vars but is worth noting.
功能分析
Type: OpenClaw Skill Name: dingtalk-approval Version: 2.3.2 The dingtalk-approval skill bundle is a legitimate integration for managing DingTalk OA approvals. The code in index.js interacts exclusively with official DingTalk API endpoints (api.dingtalk.com and oapi.dingtalk.com) to fetch tasks, details, and execute approval actions. It includes proactive security measures such as the sanitizeConfig and sanitizeAttachment functions to prevent sensitive credentials or internal resource IDs from being leaked in logs. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
Name/description, SKILL.md, openclaw.plugin.json, README and index.js all describe querying tasks, fetching details, approving/refusing tasks and querying vacation balance. The plugin requires appKey/appSecret/dingtalkUserId which are exactly the credentials needed to call DingTalk OA APIs.
Instruction Scope
SKILL.md instructs the agent to read plugin config (openclaw.json) and call specific DingTalk APIs. The included index.js implements those calls and sanitizes outputs; there are no instructions to read unrelated files or to send data to endpoints outside the DingTalk API domain.
Install Mechanism
This is an instruction-only plugin with source files included, no install spec that downloads remote code, no third‑party packages or nonstandard installers. package.json has no dependencies. No high-risk download/extraction observed.
Credentials
The plugin uses appKey/appSecret and a dingtalkUserId which are necessary for its functionality. It expects configuration in openclaw.json (and recommends optional env var substitution). Note: the top-level registry metadata reported 'no required env vars', which is consistent with using plugin config rather than platform env variables—but users should be aware credentials are stored via the plugin config unless they substitute environment variables as recommended.
Persistence & Privilege
always is false; the plugin registers tools and does not request elevated platform-wide privileges or modify other plugins. It can perform state-changing actions (approve/refuse) via the DingTalk API, which is expected for its purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dingtalk-approval
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dingtalk-approval 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.3.2
Version 2.3.2: improve page summary wording and update local publish instructions.
v2.3.1
Version 2.3.1: unify metadata versions, document get_vacation_balance, remove hardcoded permission link, and align publish metadata.
v2.3.0
Version 2.3.0 (dingtalk-approval): - Added detailed usage instructions, process examples, and error troubleshooting to documentation (SKILL.md). - Improved guidance with quick intention-to-tool parameter mapping and more user scenarios. - Expanded configuration section with clearer instructions and example. - Supplemented with references, CHANGELOG, and meta files for better documentation and management. - No changes to core tool logic; all updates relate to documentation and guides.
v1.1.0
Initial release of the dingtalk-approval skill: - Query pending DingTalk OA approval tasks for the current user. - Execute approval actions (approve or reject) on approval tasks. - Provides configuration and requirements for setup.
元数据
Slug dingtalk-approval
版本 2.3.2
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 4
常见问题

钉钉 OA 审批工具 是什么?

钉钉 OA 审批处理插件,支持查询待办、查看审批详情、执行同意/拒绝,以及查询假期余额。 **当以下情况时使用此 Skill**: (1) 用户需要查询钉钉 OA 审批待办任务列表 (2) 用户需要执行审批操作(同意或拒绝) (3) 用户提到"钉钉审批"、"OA 审批"、"待办任务"、"审批单据" (4) 用户要... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 480 次。

如何安装 钉钉 OA 审批工具?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dingtalk-approval」即可一键安装,无需额外配置。

钉钉 OA 审批工具 是免费的吗?

是的,钉钉 OA 审批工具 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

钉钉 OA 审批工具 支持哪些平台?

钉钉 OA 审批工具 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 钉钉 OA 审批工具?

由 whauff(@whauff)开发并维护,当前版本 v2.3.2。

💬 留言讨论