This skill enables sending notifications to Feishu (Lark) using webhook URLs. It supports various message types including text messages, rich text posts, interactive cards, and images.
IMPORTANT: Before using this skill, you must configure your Feishu webhook URLs:
Create the configuration file at ~/.openclaw/skills/feishu-notify/config.json with the following content:
json
{
"webhooks": {
"default": "https://open.feishu.cn/open-apis/bot/v2/hook/your-webhook-url",
"alerts": "https://open.feishu.cn/open-apis/bot/v2/hook/your-alerts-webhook-url",
"notifications": "https://open.feishu.cn/open-apis/bot/v2/hook/your-notifications-webhook-url"
}
}
The skill loads configuration from:
~/.openclaw/skills/feishu-notify/config.json (only source)Activate this skill when:
The scripts/send_message.py script provides a reliable way to send messages to Feishu via webhook. This script:
The templates/ directory contains message templates for different scenarios:
The references/api_documentation.md contains documentation about Feishu webhook API, including:
When this skill is activated:
Check configuration - Verify that ~/.openclaw/skills/feishu-notify/config.json exists and contains valid webhook URLs. If not, prompt user to configure it.
Determine message type based on user's request:
Select webhook based on context:
Build or load message:
Send message using webhook URL:
scripts/send_message.py with webhook name and message typePresent results to user:
Feishu webhooks use POST method with JSON body
Each webhook URL is specific to a Feishu group/chat
Message types include: "text", "post", "interactive", "image"
Webhook URLs are secrets and should be kept secure
config.json to version controlMessage size limit: 200KB for most message types
Interactive cards support buttons, images, markdown, and more
The script validates the response from Feishu API
Template loading is restricted to the templates/ directory for security
The agent can call this skill autonomously (messages may be sent without explicit confirmation)
Simple text-only messages.
json
{
"msg_type": "text",
"content": {
"text": "Your message here"
}
}
Messages with rich formatting including text, links, @mentions, images, and more.
Rich cards with structured content, buttons, images, and interactive elements.
Messages with image URLs (image_key or image_url).
User: "Send a notification to Feishu: 'Deployment completed successfully'" Action: Use "default" webhook, send text message with provided text
User: "Send an alert to Feishu about server error: 'Connection timeout'" Action: Use "alerts" webhook, use card_alert template with error details
User: "Send a task update to Feishu: Task #123 completed by John" Action: Use "notifications" webhook, use card_task template with task information
User: "Send a rich message to devops webhook about deployment status" Action: Use "devops" webhook, use post_rich template with deployment details
User: "Notify the team about the meeting at 3 PM" Action: Use "default" webhook, send text message with meeting details
If configuration is missing:
~/.openclaw/skills/feishu-notify/config.jsonIf webhook is not found:
If message sending fails:
If template loading fails:
templates/ directorytemplates/ directoryTemplates are stored in the templates/ directory with JSON format. Each template includes:
Security: For security reasons, template loading is restricted to the templates/ directory only. Arbitrary JSON files cannot be used as templates.
To use a template:
send_message.py script with the template pathNote: When adding custom templates, place them in the templates/ directory to ensure they can be loaded by the script.