Feishu Automation
Overview
This skill enables advanced automation across the Feishu/Lark productivity suite. It provides recipes, scripts, and workflows for common automation scenarios like batch document processing, data synchronization, report generation, and knowledge management.
Quick Start
Prerequisites
- - OpenClaw with Feishu integration configured
- Feishu app permissions enabled for:
docx, wiki, bitable, INLINECODE3 - Target documents/tables already exist and are accessible
Basic Example: Batch Update Documents
CODEBLOCK0
Core Automation Tasks
1. Document Automation
- - Batch Creation: Create multiple documents from templates
- Content Sync: Sync data from Bitable to documents
- Format Conversion: Convert between markdown and Feishu doc format
- Backup & Archive: Periodically backup important documents
2. Wiki & Knowledge Management
- - Wiki Migration: Move content between wiki spaces
- Auto-tagging: Tag wiki pages based on content analysis
- TOC Generation: Generate table of contents for large wikis
- Link Checking: Find and fix broken links in wiki
3. Bitable Automation
- - Data Import/Export: Sync Bitable with external data sources
- Report Generation: Create documents from Bitable queries
- Validation Rules: Enforce data quality in Bitable
- Notification System: Alert on Bitable changes
4. Cross-App Workflows
- - Document → Bitable: Extract structured data from documents to tables
- Bitable → Document: Generate reports from table data
- Wiki → Drive: Archive wiki pages to cloud storage
- Drive → Wiki: Import documents as wiki pages
Workflow Templates
Weekly Report Automation
- 1. Query Bitable for weekly metrics
- Generate markdown report with charts
- Create/update Feishu document
- Post to designated wiki space
- Notify team via Feishu chat
See references/weekly_report_workflow.md for detailed implementation.
Document Migration
- 1. List source folder documents
- Convert each to markdown
- Create new documents in target folder/wiki
- Update all internal links
- Verify completion
See scripts/migrate_documents.py for ready-to-use script.
Tool Reference
This skill builds on OpenClaw's native Feishu tools:
- -
feishu_doc - Document read/write operations - INLINECODE7 - Knowledge base navigation
- INLINECODE8 - Bitable operations
- INLINECODE9 - Cloud storage management
Always use the native tools directly when possible; use scripts only for complex workflows.
Included Resources
This skill comes with ready-to-use resources for common automation tasks.
scripts/
- -
batch_update.py - Update multiple documents from template - INLINECODE11 - Migrate documents between folders/spaces
- INLINECODE12 - Generate documents from Bitable data
- INLINECODE13 - Backup wiki pages to markdown files
references/
- -
weekly_report_workflow.md - Step-by-step weekly report automation - INLINECODE15 - Common API usage patterns and examples
- INLINECODE16 - Handling common Feishu API errors
- INLINECODE17 - Performance and reliability tips
assets/
- -
templates/weekly_report.md - Weekly report template - INLINECODE19 - Meeting notes template
- INLINECODE20 - Project status update template
- INLINECODE21 - Configuration examples
Getting Help
For questions or issues:
- 1. Check the relevant reference file first
- Review error messages in INLINECODE22
- Adapt scripts to your specific use case
- Consult OpenClaw Feishu documentation for tool specifics
飞书自动化
概述
本技能支持在飞书/Lark生产力套件中实现高级自动化。它提供了常见自动化场景的配方、脚本和工作流程,例如批量文档处理、数据同步、报告生成和知识管理。
快速开始
前提条件
- - 已配置飞书集成的OpenClaw
- 已启用飞书应用权限:docx、wiki、bitable、drive
- 目标文档/表格已存在且可访问
基本示例:批量更新文档
bash
使用 batch_update.py 脚本更新多个文档
python scripts/batch
update.py --folder-token fldcnXXX --template weeklyreport.md
核心自动化任务
1. 文档自动化
- - 批量创建:根据模板创建多个文档
- 内容同步:将多维表格中的数据同步到文档
- 格式转换:在Markdown和飞书文档格式之间转换
- 备份与归档:定期备份重要文档
2. 知识库与知识管理
- - 知识库迁移:在知识库空间之间移动内容
- 自动标签:基于内容分析为知识库页面添加标签
- 目录生成:为大型知识库生成目录
- 链接检查:查找并修复知识库中的失效链接
3. 多维表格自动化
- - 数据导入/导出:将多维表格与外部数据源同步
- 报告生成:根据多维表格查询创建文档
- 验证规则:在多维表格中强制执行数据质量
- 通知系统:多维表格变更时发出警报
4. 跨应用工作流
- - 文档 → 多维表格:从文档中提取结构化数据到表格
- 多维表格 → 文档:根据表格数据生成报告
- 知识库 → 云盘:将知识库页面归档到云存储
- 云盘 → 知识库:将文档导入为知识库页面
工作流模板
周报自动化
- 1. 查询多维表格获取周度指标
- 生成包含图表的Markdown报告
- 创建/更新飞书文档
- 发布到指定知识库空间
- 通过飞书聊天通知团队
详细实现请参见 references/weeklyreportworkflow.md。
文档迁移
- 1. 列出源文件夹中的文档
- 将每个文档转换为Markdown
- 在目标文件夹/知识库中创建新文档
- 更新所有内部链接
- 验证完成
可直接使用的脚本请参见 scripts/migrate_documents.py。
工具参考
本技能基于OpenClaw的原生飞书工具构建:
- - feishudoc - 文档读写操作
- feishuwiki - 知识库导航
- feishubitable* - 多维表格操作
- feishu_drive - 云存储管理
尽可能直接使用原生工具;仅在复杂工作流中使用脚本。
包含的资源
本技能附带用于常见自动化任务的即用型资源。
scripts/
- - batchupdate.py - 根据模板更新多个文档
- migratedocuments.py - 在文件夹/空间之间迁移文档
- bitabletodoc.py - 根据多维表格数据生成文档
- wiki_backup.py - 将知识库页面备份为Markdown文件
references/
- - weeklyreportworkflow.md - 周报自动化分步指南
- feishuapipatterns.md - 常见API使用模式与示例
- errorhandling.md - 处理常见飞书API错误
- bestpractices.md - 性能与可靠性提示
assets/
- - templates/weeklyreport.md - 周报模板
- templates/meetingnotes.md - 会议纪要模板
- templates/projectstatus.md - 项目状态更新模板
- config/sampleconfig.yaml - 配置示例
获取帮助
如有问题或疑问:
- 1. 首先查阅相关参考文件
- 查看 error_handling.md 中的错误信息
- 根据具体用例调整脚本
- 查阅OpenClaw飞书文档了解工具详情