feishu-send-message_skill

This skill sends messages to Feishu users via API, auto-detecting phone or user IDs to ensure delivery across formats.
  • Python

2.5k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill feishu-send-message

  • _meta.json292 B
  • SKILL.md7.0 KB

Overview

This skill sends messages to Feishu/Lark users via the Feishu API using a phone number or any user identifier (open_id, user_id, union_id). It automatically attempts all supported ID types to find a valid recipient and reads credentials from OpenClaw configuration. The tool supports plain text and rich post-format messages and includes guidance for long content handling and multi-part sends.

How this skill works

The script reads app credentials from ~/.openclaw/openclaw.json, obtains a tenant_access_token, resolves the provided identifier (local cache first, then API lookup by phone or direct ID attempts), and posts the message to the correct endpoint. It auto-detects message format: uses post format when markdown-like patterns (# or ]() present) and text format otherwise. Successful lookups are cached in ~/.openclaw/workspace/configs/feishu-users.json for faster future sends.

When to use it

  • You need to message a Feishu/Lark user by phone number or any user ID (open_id/user_id/union_id).
  • You want automatic ID resolution so you don’t need to know which ID type is valid for your app.
  • You need to send formatted notifications (title, links, lists) or simple text messages.
  • You must send long content and want guidance for splitting into multiple parts or using file input.
  • You prefer a CLI Python tool that integrates with existing OpenClaw credentials.

Best practices

  • Pass exactly two positional arguments: identifier and message (do not use flags like --json-file).
  • Prefer rich post format for formatted content; include # for titles or text for links.
  • For long messages, split into multiple smaller messages (<3000 chars recommended for safe delivery; keep post content under ~20000 chars).
  • Cache lookups locally and update user visibility in Feishu if you see "id not exist" errors.
  • Use file input (cat long_message.txt) for complex or multi-line content to avoid shell quoting issues.

Example use cases

  • Send a weather card to a user by phone: python send_message.py "+8613560824490" "# 🌤️ Weather..."
  • Send a brief status update: python send_message.py "ou_9a013a..." "✅ Task completed!"
  • Deliver a long report in parts: split into Part 1/Part 2 and send sequentially, or stream via file: python send_message.py "3b3ee7d1" "$(cat long_message.txt)"
  • Resolve unknown ID types automatically when you only have a phone number and want to message via the bot.
  • Recover from invalid user_id errors by retrying with phone or union_id; use cache to avoid repeated lookups.

FAQ

It accepts exactly two positional arguments: identifier (phone or ID) and message text. Flags like --json-file are not supported.

How do I handle messages that are too long?

Split into multiple messages (recommended if >3000 characters), or send content from a file. Rich post messages should be kept well under ~20000 characters to avoid API errors.

Why do I get "id not exist"?

The user may be outside the app's visible scope. Add the user to the app's visible range or message by phone so the tool can resolve a valid ID.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational