Feishu Bitable Creator
Creates clean, ready-to-use Feishu Bitable tables with automatic cleanup and data population.
Authentication & Permissions
This skill requires a pre-configured Feishu (Lark) integration via OpenClaw's channel system. It does not accept API keys directly from the user.
How Authentication Works
- 1. Feishu Channel Configuration: Your OpenClaw instance must have the Feishu channel enabled and configured with a valid app ID and app secret in
~/.openclaw/openclaw.json:
CODEBLOCK0
- 2. Token Management: OpenClaw's Feishu extension automatically handles token acquisition and refresh using the configured app credentials. No manual token management is required.
- 3. User Consent: When creating a table, the tool uses the agent's own identity (the Feishu app/bot). The
addBitableAdmin() function requires the owner's explicit user_id obtained from the conversation context, ensuring consent.
Required Feishu App Permissions
Your Feishu app must have these permissions granted:
| Permission | Purpose |
|---|
| INLINECODE3 | Create and manage Bitable apps |
| INLINECODE4 |
Add users as admins to documents |
|
drive:drive:read | Read drive contents |
Security Notes
- - ⚠️ No User-Supplied Credentials: This skill does NOT accept API keys, tokens, or secrets from user prompts. All authentication is handled through OpenClaw's secure channel configuration.
- ⚠️ Scope Limitation: The skill only performs actions on Bitable tables it creates. It cannot access existing tables without explicit sharing.
- ⚠️ Admin Addition Requires Explicit User ID: Adding an admin requires the specific
user_id from conversation context — the agent cannot arbitrarily add unknown users.
Setup Instructions
Before using this skill, ensure your OpenClaw host admin has:
- 1. Created a Feishu app at https://open.feishu.cn/app
- Enabled the required permissions in the Feishu app console
- Configured the app ID and secret in INLINECODE7
- Restarted the OpenClaw gateway to apply changes
For detailed setup, see: https://docs.openclaw.ai/channels/feishu
Problem with default Bitable creation:
- - Feishu creates 10 empty placeholder rows by default
- Creates 4 default columns (文本, 单选, 日期, 附件) that are often unused
- Primary field is always named "文本" which is not descriptive
- Creator has full control, but human owner has no permissions
This skill solves these issues:
- - ✅ Automatically deletes empty placeholder rows and default columns
- ✅ Intelligently renames primary field based on table name
- ✅ Adds owner as admin with full permissions
- ✅ Provides clean slate for your actual data
Quick Start
CODEBLOCK1
Designing Rich Fields (发挥多维表格价值)
💡 核心建议: 为了让多维表格真正发挥作用,建议设计丰富的标签/分类字段,但根据实际场景灵活选择。
推荐的字段设计思路
根据数据类型,考虑添加以下维度字段:
| 数据场景 | 建议字段 | 用途 |
|---|
| 项目管理 | 状态、优先级、负责人、截止日期 | 追踪进展,分配任务 |
| 研究/调研 |
分类、标签、来源、评分 | 归类信息,评估价值 |
|
产品/功能 | 模块、优先级、状态、负责人 | 产品规划,迭代管理 |
|
客户/用户 | 类型、阶段、标签、负责人 | 客户分层,跟进管理 |
|
竞品分析 | 分类、评分、标签、来源 | 对比分析,筛选查看 |
字段类型选择指南
| 字段名 | 类型 | 适用场景 |
|---|
| 标签 | MultiSelect | 一个项目可属于多个类别,用于交叉筛选 |
| 分类 |
SingleSelect | 一级分类,用于分组统计 |
|
状态 | SingleSelect | 有明确流转阶段,如待办→进行中→完成 |
|
优先级 | SingleSelect | 需要排序或区分重要性 |
|
负责人 | User | 需要分配到人 |
|
日期 | DateTime | 有时间节点要求 |
|
评分 | Number | 需要量化评估 |
|
来源 | SingleSelect | 需要追踪信息出处 |
实际设计示例
示例1:开源大模型研究
CODEBLOCK2
示例2:工作任务清单
CODEBLOCK3
设计原则
- 1. 先想怎么用:先思考用户会如何筛选/分组/排序数据
- 适度原则:字段不是越多越好,选择真正能区分数据的维度
- 数据可得:确保收集数据时能填上这些字段,不要设计无法获取的维度
- 灵活调整:如果某个字段使用率很低,后续可以删除或修改
检验标准
设计完字段后,问自己:
- - ❓ 用户能按哪些维度筛选数据?
- ❓ 能按哪些维度分组查看?
- ❓ 能按哪些维度排序?
- ❓ 数据收集时这些字段是否容易获取?
如果以上问题都有明确答案,说明字段设计合理!
实际示例:开源大模型表格
CODEBLOCK4
Add Owner as Admin
IMPORTANT: Tool creates table but does NOT add permissions. You must add the owner as admin manually.
CODEBLOCK5
Required Permissions
- -
bitable:app - Manage Bitable apps - INLINECODE9 - Manage document permissions
Primary Field Naming
| Table name contains | Primary field becomes |
|---|
| "项目" | "项目名称" |
| "研究" |
"研究名称" |
| "测试" | "测试项" |
| "数据" | "数据项" |
| "任务" | "任务名称" |
| "记录" | "记录项" |
| Other (≤6 chars) | Use table name as-is |
| Other (>6 chars) | First 4 chars + "..." |
Common Field Types
| Type ID | Name | Use For |
|---|
| 1 | Text | Names, descriptions |
| 2 |
Number | Counts, amounts |
| 3 | SingleSelect | Status, priority |
| 4 | MultiSelect | Tags, features |
| 5 | DateTime | Dates, deadlines |
| 7 | Checkbox | Done/Incomplete |
| 11 | User | Assignees |
Complete Example: Research Data Table with Rich Tags
CODEBLOCK6
{ name: "GitHub星标", type: 2 },
{ name: "使用场景", type: 4 }
],
records: [{
"AI框架对比": "AutoGPT",
"框架名称": "AutoGPT",
"GitHub星标": 157000,
"使用场景": ["自动化", "研究"]
}],
bossUserId: "ouxxxxxxxxxxxxxxxx" // Replace with actual user's openid
});
## Tips
1. **设计丰富的标签字段**: 为了让多维表格发挥作用,建议根据数据特点添加标签、分类、状态等维度字段(参考 "Designing Rich Fields" 章节)
2. **根据场景选择字段**: 不同数据类型需要不同的维度字段,如项目管理需要"状态",研究调研需要"来源",灵活设计
3. **先想怎么用**: 设计字段前先思考用户会如何筛选/分组/排序数据
4. **Multi-select values**: Pass as array: `["标签A", "标签B"]`
5. **User ID**: Get from conversation context (e.g., `ou_xxxxxxxxxxxxxxxx`)
6. **Cleanup verified**: Tool returns `cleaned_placeholder_rows` and `cleaned_default_fields`
7. **Field order**: Create fields first, then add records
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| FieldNameNotFound | Wrong primary field name | Check `primary_field_name` in result |
| 400 Bad Request | Invalid field type/value | Verify field_type ID |
| Permission Denied | Missing `drive:permission:manage` | Check app permissions |
| User Not Found | Wrong user_id format | Use `openid` type |
## Output Format
✅ Table "项目名称" created successfully!
🔗 URL: https://my.feishu.cn/base/xxxxxxxxxxxxx
🧹 Cleanup: 10 placeholder rows, 4 default columns deleted
👤 Owner: Added as admin (full_access)
📊 Records: X records added
📝 Fields: 名称, 标签, 分类, 状态, 优先级, 负责人, 日期, 描述
💡 Tip: 建议添加标签/分类/状态等维度字段,让表格支持多维筛选和分组
```
设计检查建议:
- - 是否可以根据标签交叉筛选数据?
- 是否可以按分类分组查看?
- 是否可以按状态/优先级排序?
- 数据收集时这些字段是否容易获取?
如果以上问题都有答案,说明字段设计合理!
- - ✅ 优先级 (SingleSelect) - for sorting
Feishu Bitable Creator
创建干净、可直接使用的飞书多维表格,具备自动清理和数据填充功能。
认证与权限
此技能需要通过 OpenClaw 的通道系统进行预配置的飞书集成。它不直接接受用户提供的 API 密钥。
认证工作原理
- 1. 飞书通道配置:你的 OpenClaw 实例必须在 ~/.openclaw/openclaw.json 中启用并配置飞书通道,包含有效的应用 ID 和应用密钥:
json
{
channels: {
feishu: {
enabled: true,
appId: cli_xxxxxxxxxxxxxxxx,
appSecret: your-app-secret
}
}
}
- 2. 令牌管理:OpenClaw 的飞书扩展会自动使用配置的应用凭据处理令牌的获取和刷新。无需手动管理令牌。
- 3. 用户授权:创建表格时,工具使用代理自身的身份(飞书应用/机器人)。addBitableAdmin() 函数需要从对话上下文中获取所有者的明确 user_id,以确保获得授权。
所需飞书应用权限
你的飞书应用必须授予以下权限:
| 权限 | 用途 |
|---|
| bitable:app | 创建和管理多维表格应用 |
| drive:permission:manage |
将用户添加为文档管理员 |
| drive:drive:read | 读取云盘内容 |
安全说明
- - ⚠️ 无用户提供的凭据:此技能不接受用户提示中的 API 密钥、令牌或密钥。所有认证均通过 OpenClaw 的安全通道配置处理。
- ⚠️ 范围限制:此技能仅对其创建的多维表格执行操作。未经明确共享,无法访问现有表格。
- ⚠️ 添加管理员需要明确的用户 ID:添加管理员需要对话上下文中的特定 user_id——代理不能随意添加未知用户。
设置说明
使用此技能前,请确保你的 OpenClaw 主机管理员已完成以下操作:
- 1. 在 https://open.feishu.cn/app 创建一个飞书应用
- 在飞书应用控制台中启用所需的权限
- 在 ~/.openclaw/openclaw.json 中配置应用 ID 和密钥
- 重启 OpenClaw 网关以应用更改
详细设置请参阅:https://docs.openclaw.ai/channels/feishu
默认创建多维表格的问题:
- - 飞书默认创建 10 个空占位行
- 默认创建 4 个通常用不到的列(文本、单选、日期、附件)
- 主字段始终命名为文本,不够描述性
- 创建者拥有完全控制权,但人工所有者没有权限
此技能解决了这些问题:
- - ✅ 自动删除空的占位行和默认列
- ✅ 根据表格名称智能重命名主字段
- ✅ 将所有者添加为具有完全权限的管理员
- ✅ 为你的实际数据提供干净的起点
快速开始
typescript
// 1. 创建表格(自动清理占位行和默认列)
const table = await feishubitablecreate_app({ name: 项目名称清单 });
// 返回:{ apptoken, url, tableid, primaryfieldname, cleanedplaceholderrows, cleaneddefaultfields }
// 2. 添加所有者作为管理员(必需 - 从对话上下文获取 user_id)
await addBitableAdmin({
apptoken: table.apptoken,
userid: ouxxxxxxxxxxxxxxxx // 从对话上下文或飞书用户资料获取
});
// 3. 创建带有标签/分类的丰富字段(建议根据场景选择)
// 参考 设计丰富字段 章节,选择适合的维度字段
// 4. 添加包含完整标签信息的记录
await feishubitablecreate_record({
apptoken: table.apptoken,
tableid: table.tableid,
fields: {
[table.primaryfieldname]: 项目A,
标签: [AI, 开源], // 多选,用于筛选
分类: 技术, // 单选,用于分组
状态: 进行中, // 单选,用于工作流
优先级: 高 // 单选,用于排序
}
});
return table.url;
设计丰富字段(发挥多维表格价值)
💡 核心建议:为了让多维表格真正发挥作用,建议设计丰富的标签/分类字段,但根据实际场景灵活选择。
推荐的字段设计思路
根据数据类型,考虑添加以下维度字段:
| 数据场景 | 建议字段 | 用途 |
|---|
| 项目管理 | 状态、优先级、负责人、截止日期 | 追踪进展,分配任务 |
| 研究/调研 |
分类、标签、来源、评分 | 归类信息,评估价值 |
|
产品/功能 | 模块、优先级、状态、负责人 | 产品规划,迭代管理 |
|
客户/用户 | 类型、阶段、标签、负责人 | 客户分层,跟进管理 |
|
竞品分析 | 分类、评分、标签、来源 | 对比分析,筛选查看 |
字段类型选择指南
| 字段名 | 类型 | 适用场景 |
|---|
| 标签 | 多选 | 一个项目可属于多个类别,用于交叉筛选 |
| 分类 |
单选 | 一级分类,用于分组统计 |
|
状态 | 单选 | 有明确流转阶段,如待办→进行中→完成 |
|
优先级 | 单选 | 需要排序或区分重要性 |
|
负责人 | 用户 | 需要分配到人 |
|
日期 | 日期时间 | 有时间节点要求 |
|
评分 | 数字 | 需要量化评估 |
|
来源 | 单选 | 需要追踪信息出处 |
实际设计示例
示例1:开源大模型研究
typescript
const fields = [
{ name: 模型名称, type: 1 },
{ name: 开发团队, type: 1 },
{ name: 参数量, type: 1 },
// 维度字段(根据数据特点选择)
{ name: 技术标签, type: 4 }, // [MoE, 多语言, 代码, 轻量级]
{ name: 地区, type: 3 }, // 美国/中国/欧洲
{ name: 模型类型, type: 3 }, // 通用/代码/推理
{ name: 适用场景, type: 4 }, // [企业部署, 端侧运行, 科研]
{ name: 开源协议, type: 3 }, // Apache-2.0/MIT
{ name: 发布日期, type: 5 },
{ name: 特点描述, type: 1 }
];
示例2:工作任务清单
typescript
const fields = [
{ name: 任务名称, type: 1 },
{ name: 描述, type: 1 },
// 维度字段
{ name: 分类, type: 3 }, // 技术/产品/运营
{ name: 状态, type: 3 }, // 待办/进行中/已完成
{ name: 优先级, type: 3 }, // P0/P1/P2
{ name: 负责人, type: 11 }, // @username
{ name: 截止日期, type: 5 },
{ name: 标签, type: 4 } // [紧急, 重要, 外部依赖]
];
设计原则
- 1. 先想怎么用:先思考用户会如何筛选/分组/排序数据
- 适度原则:字段不是越多越好,选择真正能区分数据的维度
- 数据可得:确保收集数据时能填上这些字段,不要设计无法获取的维度
- 灵活调整:如果某个字段使用率很低,后续可以删除或修改
检验标准
设计完字段后,问自己:
- - ❓ 用户能按哪些维度筛选数据?
- ❓ 能按哪些维度分组查看?
- ❓ 能按哪些维度排序?
- ❓ 数据收集时这些字段是否容易获取?
如果以上问题都有明确答案,说明字段设计合理!
实际示例:开源大模型表格
typescript
// 创建表格
const table = await feishubitablecreate_app({ name: 全球开源大模型TOP10 });
// 添加管理员
await addBitableAdmin({ apptoken: table.apptoken, user_id: bossUserId });
// 创建丰富的字段(带标签/分类)
const fields = [
{ name: 排名, type: 2 }, // 数字
{ name: 模型名称, type: 1 }, // 文本
{ name: