Install
openclaw skills install feishu-workflow-cliOrchestrate complex Feishu/Lark workflows using the official lark CLI (v1.0.40+, 200+ commands, 17 domains). Teach AI agents when and how to chain lark CLI commands into production-ready workflows for reporting, project management, meeting automation, document collaboration, and cross-domain orchestration. Covers: auto weekly report generation (Base→Doc→Mail→Message), project tracking dashboard (Tasks→Base→Calendar), meeting lifecycle automation (Calendar→VC→Doc→Wiki), approval-driven workflows (Approval→Message→Tasks), and data pipeline orchestration (Sheet→Base→Doc→Mail). Triggers on: 飞书CLI工作流, feishu workflow, lark CLI automation, 飞书自动化, feishu report automation, lark agent workflow, 飞书周报自动化, feishu meeting automation, lark task management, 飞书审批流程, feishu doc collaboration, lark base workflow, 飞书多维表格工作流, feishu calendar automation, lark mail automation, 飞书邮件自动化, agent feishu orchestration, AI飞书工作流
openclaw skills install feishu-workflow-cliYou are an expert at orchestrating complex workflows within Feishu/Lark using the official lark CLI. You don't just run commands — you design end-to-end workflows that chain multiple domains into automated processes.
Single commands are tools. Chained commands are workflows. Your value is the workflow, not the command.
The lark CLI covers 17 business domains with 200+ commands. Most users only use 2-3 domains in isolation. You teach agents how to combine domains into workflows that eliminate manual handoffs.
# Install
npm install -g @larksuite/cli
# Authenticate
lark auth login
# Verify
lark auth status
# Update to latest
npm update -g @larksuite/cli
| Domain | Key Commands | Workflow Role |
|---|---|---|
| Messenger | lark message send/list/reply | Notification & alerts |
| Docs | lark doc create/get/content | Report generation |
| Base | lark base record add/list/update | Data storage & tracking |
| Sheets | lark sheet read/write | Data analysis |
| Slides | lark slide create/add | Presentation output |
| Calendar | lark calendar event create/list | Scheduling & triggers |
lark mail send/list | External communication | |
| Tasks | lark task create/list/update | Action tracking |
| VC/Meetings | lark vc join/leave/events | Meeting lifecycle |
| Wiki | lark wiki create/list | Knowledge management |
| Contacts | lark contact search/list | People lookup |
| Drive | lark drive list/upload | File management |
| Approval | lark approval create/list | Process governance |
| Markdown | lark md convert | Format transformation |
Scenario: Pull data from Base/Sheets, generate a formatted Doc, email to stakeholders, notify team chat.
# Step 1: Collect completed tasks from Base
lark base record list --app <project_base> --table <tasks_table> \
--filter '{"status":"completed","week":"current"}'
# Step 2: Collect calendar events for context
lark calendar event list --start "$(date -d '7 days ago' +%Y-%m-%dT00:00:00)" \
--end "$(date +%Y-%m-%dT23:59:59)"
# Step 3: Create weekly report document
lark doc create --title "周报 $(date +%Y-W%V)" --folder <report_folder>
# Step 4: Write structured content
lark doc content --token <doc_token> --write "# 本周工作总结
## 关键成果
- [从Base数据提取]
## 会议纪要
- [从Calendar事件提取]
## 下周计划
- [从Tasks提取open tasks]
## 风险与阻塞
- [需要关注的事项]"
# Step 5: Email to stakeholders
lark mail send --to "manager@company.com" --subject "周报 $(date +%Y-W%V)" \
--body "周报已生成,请查阅: <doc_link>"
# Step 6: Notify team chat
lark message send --chat <team_chat_id> \
--text "📋 本周周报已生成: <doc_link>"
Decision Points:
Scenario: Sync project data across Tasks, Base, and Calendar for a unified view.
# Step 1: Get all open tasks
lark task list --status open --assignee <user_id>
# Step 2: Get project milestones from Base
lark base record list --app <project_base> --table <milestones_table>
# Step 3: Get upcoming deadlines from Calendar
lark calendar event list --start "$(date +%Y-%m-%dT00:00:00)" \
--end "$(date -d '+14 days' +%Y-%m-%dT23:59:59)"
# Step 4: Update Base dashboard with current status
lark base record update --app <project_base> --table <dashboard_table> \
--id <record_id> --data '{"open_tasks":<count>,"upcoming_deadlines":<count>}'
# Step 5: Send status alert if overdue items exist
if [ <overdue_count> -gt 0 ]; then
lark message send --chat <project_chat_id> \
--text "⚠️ 项目有 <overdue_count> 个逾期任务,请关注"
fi
Scenario: From scheduling to follow-up, automate the entire meeting process.
# Phase 1: Schedule
lark calendar event create \
--summary "项目评审会" \
--start "2026-05-26T15:00:00" \
--end "2026-05-26T16:00:00" \
--attendees "user1,user2,user3"
# Phase 2: Pre-meeting prep (1 hour before)
lark doc create --title "会议纪要模板 - 项目评审会" --folder <meeting_folder>
lark message send --chat <project_chat_id> \
--text "📋 评审会15:00开始,议程文档: <doc_link>"
# Phase 3: Meeting join (for AI agent)
lark vc join --meeting_id <meeting_id>
lark vc events --meeting_id <meeting_id> # Monitor events
# Phase 4: Post-meeting actions
lark vc leave --meeting_id <meeting_id>
# Create follow-up tasks from meeting notes
lark task create --summary "落实评审会决议项1" --due "2026-06-02" --assignee <owner>
lark task create --summary "落实评审会决议项2" --due "2026-06-05" --assignee <owner>
# Update meeting doc with action items
lark doc content --token <doc_token> --write "## 决议事项
1. [决议1] - 负责人: xxx - 截止: 2026-06-02
2. [决议2] - 负责人: xxx - 截止: 2026-06-05"
# Notify attendees of action items
lark mail send --to "attendees@company.com" \
--subject "评审会决议事项" \
--body "会议决议已记录,请查阅: <doc_link>"
Scenario: Submit approval, track status, notify on result, create follow-up tasks.
# Step 1: Submit approval
lark approval create --definition <approval_code> \
--data '{"title":"采购申请","amount":"50000","reason":"设备更新"}'
# Step 2: Monitor approval status (poll or webhook)
lark approval list --status pending --applicant <user_id>
# Step 3: On approval - create execution tasks
# (Triggered when status changes to approved)
lark task create --summary "执行采购 - 设备更新" --due "2026-06-15"
lark base record add --app <procurement_base> --table <orders_table> \
--data '{"item":"设备更新","amount":"50000","status":"approved","deadline":"2026-06-15"}'
# Step 4: Notify relevant parties
lark message send --chat <finance_chat_id> \
--text "✅ 采购申请已批准: 设备更新 ¥50,000"
lark mail send --to "supplier@vendor.com" \
--subject "采购订单 - 设备更新" \
--body "请确认以下订单..."
Scenario: Extract data from Sheets, transform in Base, generate Doc report, distribute via Mail.
# Step 1: Read raw data from Sheet
lark sheet read --token <sheet_token> --range "A1:Z1000"
# Step 2: Process and store in Base
lark base record add --app <analytics_base> --table <metrics_table> \
--data '{"date":"2026-05-26","metric1":"<value>","metric2":"<value>"}'
# Step 3: Generate analysis document
lark doc create --title "数据分析报告 $(date +%Y%m%d)" --folder <reports_folder>
lark doc content --token <doc_token> --write "# 数据分析报告
## 关键指标
| 指标 | 本周 | 上周 | 变化 |
|------|------|------|------|
| ... | ... | ... | ... |
## 趋势分析
[基于Base数据生成]
## 建议行动
1. ...
2. ..."
# Step 4: Create presentation for leadership
lark slide create --title "数据周报 $(date +%Y-W%V)" --folder <presentations_folder>
# Step 5: Distribute
lark mail send --to "leadership@company.com" \
--subject "数据周报 $(date +%Y-W%V)" \
--body "报告已生成: <doc_link>\n演示文稿: <slide_link>"
lark message send --chat <data_team_chat> \
--text "📊 数据周报已生成: <doc_link>"
When a user requests a Feishu-related task, follow this decision tree:
User Request
├── Single action (send message, create doc)?
│ └── Direct command → Done
├── Reporting / periodic summary?
│ └── Workflow 1 (Auto Weekly Report)
├── Project tracking / status?
│ └── Workflow 2 (Project Dashboard)
├── Meeting-related?
│ └── Workflow 3 (Meeting Lifecycle)
├── Approval / process?
│ └── Workflow 4 (Approval-Driven)
├── Data analysis / pipeline?
│ └── Workflow 5 (Data Pipeline)
├── Cross-platform (needs DingTalk/WeCom)?
│ └── Delegate to china-im-workflow-cli
└── Novel combination?
└── Compose from domain primitives below
When the templates don't fit, compose from these primitives:
lark base record list → Structured data from tableslark sheet read → Tabular data from spreadsheetslark calendar event list → Schedule datalark task list → Task status datalark mail list → Email datalark message list → Chat historylark doc content → Document contentlark base record update/add → Store processed datalark sheet write → Write analysis resultslark md convert → Format transformationlark doc create + content → Generate documentslark slide create + add → Generate presentationslark mail send → Email distributionlark message send → Chat notificationlark task create → Create action itemslark calendar event create → Schedule follow-upslark approval list --status → Approval state changelark calendar event list → Upcoming eventslark task list --status → Task state changelark vc events → Meeting events# Check condition first
overdue=$(lark task list --status overdue --format json | jq 'length')
if [ "$overdue" -gt 0 ]; then
# Escalation path
lark message send --chat <manager_chat> --text "⚠️ $overdue 个任务逾期"
dws ding send --users "manager" --text "请关注逾期任务" # Cross-platform if needed
else
# Normal path
lark message send --chat <team_chat> --text "✅ 所有任务按时完成"
fi
# Process multiple records from Base
records=$(lark base record list --app <base_id> --table <table_id> --format json)
echo "$records" | jq -c '.[]' | while read record; do
id=$(echo "$record" | jq -r '.id')
# Process each record
lark base record update --app <base_id> --table <table_id> \
--id "$id" --data '{"processed":true}'
done
# Try primary action, fall back to alternative
if ! lark doc content --token <token> --write "content"; then
# Fallback: create new doc if write fails
lark doc create --title "Fallback Report" --folder <folder>
lark message send --chat <chat_id> --text "⚠️ 原文档写入失败,已创建新文档"
fi
--dry-run when availablesleep 3 between iterationslark auth status before starting workflowsBefore starting any workflow:
# Check CLI is installed and up to date
which lark && lark --version || echo "Install: npm install -g @larksuite/cli"
# Check auth
lark auth status
# Verify required domains are accessible
lark doc list --limit 1 2>/dev/null && echo "✅ Docs" || echo "❌ Docs"
lark base list --limit 1 2>/dev/null && echo "✅ Base" || echo "❌ Base"
lark calendar list --limit 1 2>/dev/null && echo "✅ Calendar" || echo "❌ Calendar"
Always check lark --version and refer to the changelog for domain availability.
When a workflow needs to reach beyond Feishu (DingTalk/WeCom), delegate to the china-im-workflow-cli skill which handles cross-platform orchestration. Common escalation scenarios:
dws ding sendwecom message send