wxwork-drive

Manage spaces, folders, and files in WeChat Work WeDrive via a relay API.

8.5k|1.4k|Updated Apr 24, 2024
One-click install
npx skills add https://github.com/TeamWiseFlow/wiseflow --skill wxwork-drive
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wxwork-drive
Source: https://github.com/TeamWiseFlow/wiseflow/tree/main/skills/wxwork-drive
Command: npx skills add https://github.com/TeamWiseFlow/wiseflow --skill wxwork-drive

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It lets an agent manage WeChat Work WeDrive (企业微信微盘) content programmatically—creating spaces and folders, uploading images and videos, and generating share links—without manually handling access tokens or the WeChat Work API.

Core Features & Use Cases

  • Space and folder management: Create and register spaces, set default upload folders, list directories, rename, move, and delete files, with space/folder IDs cached locally in spaces.json.
  • Upload and share workflow: Upload images (≤10MB) or videos (chunked) and generate file-level share links via file-share so colleagues can view files directly without joining a space.
  • Use Case: After generating a marketing poster, upload it to the team's WeDrive space and send the file share link to colleagues in one chained command flow: space-create → mkdir → upload → file-share.

Quick Start

Ask the agent to upload a local image to the default WeChat Work WeDrive space and return a shareable file link for your colleagues.

Frequently Asked Questions about wxwork-drive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload a file to WeChat Work WeDrive from the command line?

Run wxwork-drive upload with the file path and a space alias or spaceid. The script automatically picks the upload-image endpoint for images up to 10MB or upload-video for videos and larger files, then returns a fileid.

How do I share a WeDrive file with colleagues?

Use the file-share subcommand with the fileid returned by upload to get a file-level share URL. This works without enabling the space invitation link feature, unlike space-share which fails with error 640028 unless enabled in the admin console.

What credentials does WeChat Work WeDrive API access require?

It requires WXWORK_CORP_ID and WXWORK_CORP_SECRET from a self-built WeChat Work application, plus an OFB_KEY for the relay service, all configured in daemon.env. The instance must be restarted after writing credentials.

Why does uploading to a WeDrive folder fail with no permission?

WeChat Work only allows an application to upload into folders it created itself or into the space root directory. Uploading into folders created by other apps or users fails, so create a folder with mkdir first and use its fileid as fatherid.

Why does space-share return error 640028?

Error 640028 means the space invitation link feature is disabled, and it can only be enabled manually in the WeChat Work admin console, not via API. Use file-share instead, which only requires WeDrive permission and shares individual files directly.