dingtalk-docs
管理钉钉云文档中的文档、文件夹和内容。当用户想要创建文档、搜索文档、读取或写入文档内容、创建文件夹整理文档时使用。也适用于用户提到云文档、在线文档、钉钉文档、钉文档等关键词的场景。不要在用户需要操作多维表、管理日程、发消息或处理审批流时触发。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/chayjan/dingtalk-docs-0-3-1钉钉云文档 Skill
Overview
用户可能要求你创建、搜索、读取或编辑钉钉云文档。操作之间存在严格依赖关系:必须先获取 ID 才能执行后续操作。
严格禁止
- 禁止编造 ID -- dentryUuid 必须从返回值中提取,编造 ID 会操作到错误文档或报错
- 创建前必须先获取根目录 ID -- 必须先调 get_my_docs_root_dentry_uuid 拿到 rootDentryUuid
- 禁止混淆两个创建方法 -- create_doc_under_node 只能创建文档,create_dentry_under_node 支持文件夹/表格/PPT 等多种类型
- 写入前必须确认 updateType -- 0=覆盖(清空后写入),1=续写(追加到末尾),搞反会丢数据,不确定时必须先问用户
- 禁止只传 ID 读内容 -- 必须拼成完整 URL
https://alidocs.dingtalk.com/i/nodes/{dentryUuid} - 禁止在用户说"表格"时默认创建文档 -- 可能要在线表格(accessType="1")或多维表(accessType="7"),不确定必须先问
- 禁止传错参数类型 -- accessType 必须是字符串,updateType 必须是数字,类型传错会导致静默失败
可用方法列表
| 方法 | 用途 | 必填参数 |
|---|---|---|
get_my_docs_root_dentry_uuid | 获取"我的文档"根目录 ID | 无 |
list_accessible_documents | 搜索有权限的文档 | 无 (keyword 选填) |
create_doc_under_node | 创建在线文档 | name, parentDentryUuid |
create_dentry_under_node | 创建节点 (文档/表格/文件夹等) | name, accessType, parentDentryUuid |
write_content_to_document | 写入文档内容 (覆盖或续写) | content, updateType, targetDentryUuid |
get_document_content_by_url | 通过 URL 获取文档 Markdown 内容 | docUrl |
意图判断
用户说"创建文档/新建文档/写个文档/帮我建个文档":
- 创建文档 → 先 get_my_docs_root_dentry_uuid,再 create_doc_under_node
- 创建到指定文件夹 → 用文件夹的 dentryUuid 作为 parentDentryUuid
用户说"建文件夹/新建目录/整理一下文档":
- 创建文件夹 → create_dentry_under_node(accessType="13")
用户说"创建表格/建个PPT/做个脑图":
- 非文档类型 → create_dentry_under_node,accessType: 表格="1",PPT="2",脑图="6",多维表="7"
- 用户说"表格"但不确定类型 → 先问是在线表格还是多维表
关键区分: 在线表格(accessType="1") vs 多维表(accessType="7") vs 文档(用 create_doc_under_node)
用户说"搜索/找文档/查一下/有没有某个文档":
- 搜索 → list_accessible_documents(keyword=关键词)
用户说"读文档/看看内容/打开文档/这个文档写了什么":
- 有 URL → 直接 get_document_content_by_url
- 有文档名 → 先 list_accessible_documents 搜索,拿到 dentryUuid,拼 URL 再读
用户说"写入/更新内容/编辑文档/往文档里加点东西":
- 全新内容或替换 → write_content_to_document(updateType=0) 覆盖
- 追加内容 → write_content_to_document(updateType=1) 续写
- 不确定 → 问用户是覆盖还是追加
核心工作流
创建文档并写入:
- get_my_docs_root_dentry_uuid() → 提取 rootDentryUuid
- create_doc_under_node(name, parentDentryUuid=rootDentryUuid) → 提取 dentryUuid
- (HARD-GATE: 必须确认 updateType) write_content_to_document(content, updateType=0, targetDentryUuid=dentryUuid) → 提取写入结果
- get_document_content_by_url(docUrl="https://alidocs.dingtalk.com/i/nodes/{dentryUuid}") → 验证
搜索并读取:
- list_accessible_documents(keyword="关键词") → 提取 docs[].dentryUuid
- get_document_content_by_url(docUrl="https://alidocs.dingtalk.com/i/nodes/{dentryUuid}")
创建文件夹并整理:
- get_my_docs_root_dentry_uuid() → 提取 rootDentryUuid
- create_dentry_under_node(name, accessType="13", parentDentryUuid=rootDentryUuid) → 提取 dentryUuid
- create_doc_under_node(name, parentDentryUuid=文件夹dentryUuid)
上下文传递规则
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-chayjan-dingtalk-docs-0-3-1": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Coding
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.
pdf-contract-redactor
PDF contract redaction tool. Use when the user needs to redact sensitive information from scanned PDF contracts. The tool performs OCR to extract text, identifies field names and their corresponding values, and redacts only the values while keeping field names visible. Supports Alibaba Cloud OCR API for accurate Chinese text recognition.
investment-data
获取高质量 A 股投资数据,基于 investment_data 项目。支持日终价格、涨跌停数据、指数数据等。每日更新,多数据源交叉验证。触发词:股票数据、A股数据、金融数据、量化数据、历史行情。
dingtalk
DingTalk channel plugin for OpenClaw - send and receive messages via DingTalk (钉钉)