ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

feishu-file-upload

Upload and send local files to Feishu chats. Requires Feishu app credentials (app_id/app_secret) in ~/.openclaw/openclaw.json. Use when user asks to send/share/upload files (CSV, PDF, Excel, images, ZIP) to Feishu. Supports chat_id (groups), open_id/user_id (users), and email recipients.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/brucezhu888/feishu-file-upload
Or

Feishu File Upload

Upload local files to Feishu Drive and send as file messages to chats or users.

When to Use

  • User asks to "send file", "upload file", or "share file" to Feishu
  • Need to share documents (CSV, PDF, Excel, Word) with group or individual
  • Bot needs to send files that Feishu's native message API doesn't support directly
  • Images/videos: Use media parameter in message tool instead (no need for this skill)

Quick Start

Send to Group Chat

python scripts/upload_to_feishu.py /path/to/file.csv oc_xxxxxx --type chat_id

Send to Individual User

python scripts/upload_to_feishu.py /path/to/file.pdf ou_xxxxxx --type open_id

Send via Email

python scripts/upload_to_feishu.py /path/to/file.zip [email protected] --type email

Use Environment Variable

export OPENCLAW_CHAT_ID=oc_xxxxxx
python scripts/upload_to_feishu.py /path/to/file.csv --env

How It Works

  1. Read credentials from ~/.openclaw/openclaw.json (channels.feishu.appId/appSecret)
  2. Get tenant access token from Feishu Auth API
  3. Upload file to Feishu Drive → returns file_key
  4. Send file message using file_key to target chat/user

Script Usage

Arguments

ArgumentRequiredDefaultDescription
file_pathYes-Absolute path to local file
receive_idYes*-Recipient ID (chat_id, open_id, user_id, or email)
--typeNochat_idRecipient type: chat_id, open_id, user_id, email
--envNofalseGet receive_id from OPENCLAW_CHAT_ID env var

*Not required if --env is used

Receive ID Types

TypeExampleUse Case
chat_idoc_06a6b40e03e98e41c8aebcbed8b09871Group chats (default)
open_idou_b0f83ea276761ab10ebb3f4f277453b8Individual user (recommended)
user_id123456Individual user (by user_id)
email[email protected]Send to email address

Extract Chat ID from Feishu Message

From Feishu message metadata:

{
  "conversation_label": "oc_06a6b40e03e98e41c8aebcbed8b09871"
}

receive_id = oc_06a6b40e03e98e41c8aebcbed8b09871, type = chat_id

From sender info:

{
  "sender_id": "ou_b0f83ea276761ab10ebb3f4f277453b8"
}

receive_id = ou_b0f83ea276761ab10ebb3f4f277453b8, type = open_id

Prerequisites

  • Python 3.6+
  • requests library: pip install requests
  • Feishu bot credentials in openclaw.json

Feishu API Permissions

Bot needs these permissions in Feishu Developer Console:

Required for file upload:

  • im:resource:upload - Upload files (preferred)
  • OR im:resource - Read and upload files

Required for sending messages:

  • im:message - Send messages to chats

How to Enable Permissions

Metadata

Stars4190
Views1
Updated2026-04-18
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-brucezhu888-feishu-file-upload": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.