CRITICAL — Before starting, you MUST first use the Read tool to read ../lark-shared/SKILL.md, which contains authentication and permission handling
Applicable Scenarios
- "Help me urge that reimbursement approval" / "urge approval"
- "Who has approval form 12345 reached?" / "who is the approval with"
- "Help me urge the approval process" / "urge handling"
- "Remind the approver to handle the approval" / "approval reminder"
- "Follow up on XXX's approval progress" / "follow up on the approval process"
Prerequisites
Requires user identity(to query approvals) and bot identity(to send reminder messages).
lark-cli auth login --domain im,contact --scope "approval:instance:readonly"
Note: The approval API is not directly wrapped by lark-cli and needs to be called using
lark-cli api. Before first use, refer to../lark-openapi-explorer/SKILL.mdto confirm the API path.
Workflow
{审批实例 ID 或 approval_code}
│
├── lark-cli api GET ────────────► 查询审批实例状态
│ /approval/v4/instances/{id}
│
├── AI 提取当前审批人 ───────────► approver_open_id
│
├── contact +search-user ─────────► 获取审批人信息(姓名等)
│
├── im +messages-send ────────────► 发送催办消息
│
└── [超24h未处理] ────────────────► 升级催办策略
├── 群内 @催办
└── 通知上级/HR
Step 1: Query approval instance status
Method 1: Query by instance ID
If the user provides an approval instance ID:
MSYS_NO_PATHCONV=1 lark-cli api GET "/open-apis/approval/v4/instances/<instance_id>" \
--as user
Method 2: Query by approval definition code
If the user provides the code (or name) of the approval definition:
# 先通过 openapi-explorer 确认 API 路径
# 查询待审批实例列表
MSYS_NO_PATHCONV=1 lark-cli api GET "/open-apis/approval/v4/instances" \
--params '{
"approval_code": "<approval_code>",
"status": "1",
"page_size": 50
}' \
--as user
status parameter description:
1— Under approval (pending)2— Approved3— Rejected4— Canceled6— Transferred
API Documentation Confirmation
The approval API is not directly wrapped by lark-cli. Before calling, it is recommended to use openapi-explorer mode to confirm the latest API path and parameters:
- Get the top-level index:
https://open.feishu.cn/llms.txt- Find the approval module documentation link
- Confirm the parameters and response format of the specific API
Step 2: Extract the current approver
Extract from the approval instance details:
instance_code— Instance numbertitle— Approval titlestatus— Current status- Current approval node and approver information
The AI analyzes from the returned results thecurrent pending approval nodeandthe corresponding approver。
The approver may be an individual (open_id) or a group, and they need to be handled separately.
Step 3: Find approver information
lark-cli contact +search-user --query "<审批人姓名>" --as user
Get the approver's open_id。
Step 4: Send reminder message
lark-cli im +messages-send \
--user-id "<approver_open_id>" \
--markdown "审批催办提醒
审批单:{审批标题}
审批编号:{instance_code}
提交时间:{submit_time}
当前状态:待您审批
请您尽快处理,如有问题请联系发起人。" \
--as bot
Step 5: Escalate reminder (optional)
If the approval has been unhandled for more than 24 hours, start the escalation strategy:
Level 2: @mention reminder in the group
lark-cli im +messages-send \
--chat-id "<相关群chat_id>" \
--markdown '<at user_id="ou_xxx"></at> 您有一笔审批单待处理已超过 24 小时,请尽快处理:
审批单:{审批标题}
审批编号:{instance_code}' \
--as bot
Level 3: Notify the superior
If it is still unhandled after more than 48 hours, notify the approver's direct superior or the initiator:
lark-cli im +messages-send \
--user-id "<上级或发起人_open_id>" \
--markdown "审批超时通知
审批单:{审批标题}
审批编号:{instance_code}
当前审批人:{审批人姓名}
等待时间:{N} 小时
请协助推动审批流程。" \
--as bot
Fallback Strategy
| Scenario | Fallback Plan |
|---|---|
| Approval API unavailable | Prompt the user to check whether approval permission is enabled |
| Approval instance not found | Prompt the user to confirm the instance ID or approval name |
| Approver not found | Use the returned open_id to send the message directly |
| Message sending failed | Output reminder information so the user can notify manually |
| No group chat to @ | Skip the in-group @reminder and notify the individual directly |
| Approval completed | Inform the user that "this approval has already been processed" and no reminder is needed |
Permission table
| Command | Required scope |
|---|---|
approval/v4/instances (GET) |
approval:instance:readonly |
contact +search-user |
contact:user.base:readonly |
im +messages-send |
im:message |
Reference
../lark-openapi-explorer/SKILL.md— Native API call mode (the approval API is not encapsulated, so this mode is required)../lark-im/SKILL.md— Message sending../lark-contact/SKILL.md— Contacts query