Feishu Automation
Scanned@Hejk
npx machina-cli add skill @Hejk/feishu-automation --openclawFeishu 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,drive - Target documents/tables already exist and are accessible
Basic Example: Batch Update Documents
# Use the batch_update.py script to update multiple documents
python scripts/batch_update.py --folder-token fldcnXXX --template "weekly_report.md"
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
- 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
- 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 operationsfeishu_wiki- Knowledge base navigationfeishu_bitable_*- Bitable operationsfeishu_drive- 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 templatemigrate_documents.py- Migrate documents between folders/spacesbitable_to_doc.py- Generate documents from Bitable datawiki_backup.py- Backup wiki pages to markdown files
references/
weekly_report_workflow.md- Step-by-step weekly report automationfeishu_api_patterns.md- Common API usage patterns and exampleserror_handling.md- Handling common Feishu API errorsbest_practices.md- Performance and reliability tips
assets/
templates/weekly_report.md- Weekly report templatetemplates/meeting_notes.md- Meeting notes templatetemplates/project_status.md- Project status update templateconfig/sample_config.yaml- Configuration examples
Getting Help
For questions or issues:
- Check the relevant reference file first
- Review error messages in
error_handling.md - Adapt scripts to your specific use case
- Consult OpenClaw Feishu documentation for tool specifics
Overview
Feishu Automation enables advanced automation across the Feishu/Lark suite, offering recipes, scripts, and workflows for batch document processing, data synchronization, report generation, and knowledge management. It helps automate repetitive tasks across documents, wikis, bitables, and cloud storage, saving time and reducing errors.
How This Skill Works
This skill leverages OpenClaw's native Feishu tools (feishu_doc, feishu_wiki, feishu_bitable_*, feishu_drive) and ready-made scripts like batch_update.py and migrate_documents.py. Users configure OpenClaw with Feishu integration, grant app permissions for docx, wiki, bitable, and drive, and run workflows that extract, transform, and push data between Feishu apps, enabling cross-app automation.
When to Use It
- Batch-create or update many Feishu documents from a template
- Sync data between Feishu Bitable tables and documents
- Migrate or back up knowledge wiki content across spaces
- Generate rich reports from Bitable queries into Feishu documents
- Coordinate cross-app workflows like Document → Bitable or Wiki → Drive
Quick Start
- Step 1: Ensure OpenClaw Feishu integration is configured and Feishu permissions for docx, wiki, bitable, and drive are enabled
- Step 2: Run the batch update example: python scripts/batch_update.py --folder-token fldcnXXX --template "weekly_report.md"
- Step 3: Verify updates in Feishu docs/wiki, and monitor for any errors; adjust templates or scripts as needed
Best Practices
- Preconfigure the Feishu integration and enable required app permissions (docx, wiki, bitable, drive)
- Start with non-production templates and test workflows in a safe workspace
- Use clearly named templates and scripts; reference OpenClaw resources
- Validate data quality with Bitable rules and implement error handling
- Maintain versioned templates and logs; monitor results and alerts
Example Use Cases
- Batch update multiple documents from a weekly_report.md template using batch_update.py
- Weekly Report Automation: query Bitable for metrics, generate a markdown report with charts, and publish to a Feishu document and wiki
- Wiki Migration: move content between wiki spaces and update internal links
- Bitable Data Import/Export: sync external data sources with Feishu Bitables and generate reports from queries
- Cross-app workflow: extract structured data from documents to Bitable tables and generate reports back into documents