π¦ ClawHub
Feishu Bot
by @jason-aka-chen
Feishu (Lark) Bot integration for messaging, group management, and approval workflows. Send messages, manage groups, handle approvals, and automate notificat...
π‘ Examples
Send Text Message
from feishu_bot import FeishuBotbot = FeishuBot()
Send to user
bot.send_text("user_id", "Hello from bot!")Send to group
bot.send_text("chat_id", "Group message", is_chat=True)
Send Card Message
card = {
"type": "template",
"data": {
"template_id": "xxx",
"template_variable": {"title": "Notification"}
}
}
bot.send_card("chat_id", card)
Create Group
group = bot.create_group(
name="Project Team",
user_ids=["ou_xxx", "ou_yyy"]
)
print(group["chat_id"])
Approval Workflow
# Create approval
approval = bot.create_approval(
approval_code="xxx",
user_id="ou_xxx",
form={"field1": "value1"}
)Query status
status = bot.get_approval_instance(approval["instance_id"])
βοΈ Configuration
Set environment variables:
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"
Or configure in OpenClaw settings.
TERMINAL
clawhub install feishu-bot-chen