feishu-interactive-cardsCreate and send interactive cards to Feishu (Lark) with buttons, forms, polls, and rich UI elements. Use when replying to Feishu messages and there is ANY uncertainty - send an interactive card instead of plain text to let users choose via buttons. Automatically handles callbacks via long-polling connection. Use for confirmations, choices, forms, todos, polls, or any scenario requiring user interaction in Feishu.
Install via ClawdBot CLI:
clawdbot install leecyang/feishu-interactive-cardsWhen replying to Feishu and there is ANY uncertainty: send an interactive card instead of plain text.
Interactive cards let users respond via buttons rather than typing, making interactions faster and clearer.
Must use interactive cards:
Plain text is OK:
Example:
cd E:\openclaw\workspace\skills\feishu-interactive-cards\scripts
node card-callback-server.js
Features:
# Confirmation card
node scripts/send-card.js confirmation "Confirm delete file?" --chat-id oc_xxx
# Todo list
node scripts/send-card.js todo --chat-id oc_xxx
# Poll
node scripts/send-card.js poll "Team activity" --options "Bowling,Movie,Dinner" --chat-id oc_xxx
# Custom card
node scripts/send-card.js custom --template examples/custom-card.json --chat-id oc_xxx
When Agent needs to send Feishu messages:
// Wrong: Send plain text
await message({
action: "send",
channel: "feishu",
message: "Confirm delete?"
});
// Right: Send interactive card
await exec({
command: `node E:\\openclaw\\workspace\\skills\\feishu-interactive-cards\\scripts\\send-card.js confirmation "Confirm delete file test.txt?" --chat-id ${chatId}`
});
See examples/ directory for complete card templates:
confirmation-card.json - Confirmation dialogstodo-card.json - Task lists with checkboxespoll-card.json - Polls and surveysform-card.json - Forms with input fieldsFor detailed card design patterns and best practices, see references/card-design-guide.md.
Callback server automatically sends all card interactions to OpenClaw Gateway. For detailed integration guide, see references/gateway-integration.md.
Quick example:
// Handle confirmation
if (callback.data.action.value.action === "confirm") {
const file = callback.data.action.value.file;
// ⚠️ SECURITY: Validate and sanitize file path before use
// Use OpenClaw's built-in file operations instead of shell commands
const fs = require('fs').promises;
const path = require('path');
try {
// Validate file path (prevent directory traversal)
const safePath = path.resolve(file);
if (!safePath.startsWith(process.cwd())) {
throw new Error('Invalid file path');
}
// Use fs API instead of shell command
await fs.unlink(safePath);
// Update card
await updateCard(callback.context.open_message_id, {
header: { title: "Done", template: "green" },
elements: [
{ tag: "div", text: { content: `File ${path.basename(safePath)} deleted`, tag: "lark_md" } }
]
});
} catch (error) {
// Handle error
await updateCard(callback.context.open_message_id, {
header: { title: "Error", template: "red" },
elements: [
{ tag: "div", text: { content: `Failed to delete file: ${error.message}`, tag: "lark_md" } }
]
});
}
}
danger type for destructive operationsvalue to avoid extra queriesUser request -> Agent decides -> Send card -> User clicks button
-> Callback server -> Gateway -> Agent handles -> Update card/execute
Configure in ~/.openclaw/openclaw.json:
{
"channels": {
"feishu": {
"accounts": {
"main": {
"appId": "YOUR_APP_ID",
"appSecret": "YOUR_APP_SECRET"
}
}
}
},
"gateway": {
"enabled": true,
"port": 18789,
"token": "YOUR_GATEWAY_TOKEN"
}
}
Callback server reads config automatically.
Button clicks not working:
card.action.trigger event is subscribedGateway not receiving callbacks:
E:\openclaw\workspace\scripts\gateway.cmd~/.openclaw\openclaw.jsonCard display issues:
⚠️ CRITICAL: Never pass user input directly to shell commands!
This skill includes comprehensive security guidelines. Please read references/security-best-practices.md before implementing callback handlers.
Key security principles:
Generated Mar 1, 2026
When a user reports an issue via Feishu, the agent sends an interactive card with options like 'Resolve', 'Escalate', or 'Request More Info' instead of asking for typed responses. This streamlines the support workflow by allowing quick categorization and action, reducing response time and clarifying next steps.
For team coordination, the agent creates a poll card with proposed meeting times or activity choices (e.g., 'Bowling', 'Movie', 'Dinner'). Users vote via buttons, eliminating back-and-forth messages and automatically tallying preferences to finalize plans efficiently.
Managers use todo cards to assign tasks with checkboxes, enabling team members to mark completion directly in Feishu. This provides real-time updates on project progress without manual status reports, enhancing transparency and accountability in agile workflows.
In e-commerce, after a user places an order, the agent sends a confirmation card with buttons like 'Confirm Order' or 'Cancel'. This reduces errors by ensuring explicit user approval before processing payments, improving customer trust and reducing chargebacks.
HR departments deploy form cards to collect new hire information (e.g., personal details, preferences) interactively. Users fill out fields within Feishu, automating data entry and reducing manual paperwork, while ensuring compliance through structured input validation.
Offer this skill as part of a subscription-based platform where businesses pay monthly for automated Feishu interactions. Revenue comes from tiered plans based on usage volume, such as number of cards sent or advanced features like analytics and custom templates.
Provide consulting services to help companies integrate interactive cards into their existing Feishu workflows. Revenue is generated through project-based fees for setup, customization, and training, targeting enterprises with complex operational needs.
Distribute the skill for free with basic templates, then charge for premium templates (e.g., advanced polls, compliance forms) or enhanced support. Revenue streams include one-time purchases for templates and upsells to enterprise-grade security features.
💬 Integration Tip
Start by testing with simple confirmation cards to ensure the callback server and gateway are properly configured before scaling to complex workflows.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.
Gmail API integration with managed OAuth. Read, send, and manage emails, threads, labels, and drafts. Use this skill when users want to interact with Gmail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Automatically logs into email accounts (Gmail, Outlook, QQ Mail, etc.) and generates daily email summaries. Use when the user wants to get a summary of their emails, check important messages, or create daily email digests.
Fetch content from Feishu (Lark) Wiki, Docs, Sheets, and Bitable. Automatically resolves Wiki URLs to real entities and converts content to Markdown.
Manage Feishu (Lark) calendars by listing, searching, checking schedules, syncing events, and marking tasks with automated date extraction.