Feishu Contacts Sync for Openclaw

Automatically synchronizes Feishu (Lark) contact names and their corresponding open_ids into your agent's context to enable accurate sender identification in direct messages.

4ier
v1.0.0
Mar 9, 2026
0
958
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install feishu-contacts-sync

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install feishu-contacts-sync using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Feishu Contacts Sync?

The Feishu Contacts Sync skill is designed to solve a specific technical hurdle when using Feishu (Lark) with AI agents: direct messages (DMs) provide an open_id but no sender name. This skill bridges that gap by generating an open_id-to-name lookup table directly within your USER.md file. By doing so, it leverages Openclaw Skills to provide the agent with immediate, zero-tool-call access to identity data.

Since Feishu open_ids are unique to each specific app, this skill ensures that your agent remains accurate across different workspace configurations. It allows for a more personalized and secure interaction model, as the agent can distinguish between the primary account owner and other team members reaching out via private chat.

Feishu Contacts Sync Use Cases

  • Identifying the specific human sender of a Feishu direct message without additional API calls.
  • Enabling multi-user support for a single AI agent instance by providing a verified contact registry.
  • Keeping your agent's knowledge of the organization's team structure updated following HR or department changes.
  • Improving security by ensuring the agent doesn't assume every DM sender is the primary administrator.

How Feishu Contacts Sync Works

  1. The sync script authenticates with the Feishu API using app credentials stored in your configuration.
  2. It retrieves a list of users and their app-scoped open_ids from the Feishu contacts directory.
  3. The script locates the contacts section within your local USER.md file.
  4. It injects or updates a markdown table containing the mapping of names to open_ids.
  5. When the gateway restarts, the AI agent ingests the updated USER.md into its system prompt, allowing it to match inbound metadata against the table instantly.

Feishu Contacts Sync Setup

1. Configure Feishu Permissions

Ensure your Feishu app has the contact:user.employee_id:readonly or contact:user.base:readonly scope enabled in the Feishu Developer Console.

2. Execute the Sync Script

Run the provided Python script to populate your USER.md file. Use the following command structure:

python3 scripts/sync_feishu_contacts.py <openclaw_config_path> <feishu_account_name> <user_md_path>

3. Update AGENTS.md

Add an instruction to your agent startup sequence to check the lookup table. For example:

Extract the open_id from inbound metadata and match it against the Feishu Contacts table in USER.md to identify the sender.

Feishu Contacts Sync Data Schema & Taxonomy

The skill organizes data into a structured Markdown table within the USER.md file to be consumed by Openclaw Skills.

Field Description
Name The display name of the Feishu user.
open_id The app-scoped unique identifier (e.g., ou_abc123).

The script expects a header in USER.md (e.g., ## Feishu Contacts) to identify the insertion point for the data table.

Feishu Contacts Sync Advanced Features

  • Support for app-scoped IDs, ensuring that multiple Openclaw instances using different Feishu apps remain synchronized with the correct identifiers.
  • Automated periodic updates via system crontab, allowing for hands-off maintenance of the contact list.
  • Privacy-focused design that only syncs names and open_ids, avoiding the exposure of sensitive PII like phone numbers or emails.
  • Zero-latency identity resolution by embedding data in the system prompt rather than relying on external tool calls.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*