richagain

WeChat Work OpenClaw Adapter

ビジネス運営v1.0.0
作者:richagain更新日 2026-05-11wecom-openclaw@clawhub_richagain/wecom-openclaw
カスタマーサポート#WeChat

AlphaMoatによると、2026-09時点でWeChat Work OpenClaw Adapterのダウンロード数は1,446、スター数は0で、AIスキル全体5,078件中4,802位、ビジネス運営では297件中276位です。

インストール数
219
ダウンロード数
1446
スター数
-
総合順位
#4,802
全体の上位 95% · ビジネス運営の上位 93%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗401324--
SkillHub ↗2191446-—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

Node.js のアダプターが msg_signature の検証と復号を行い、OpenClaw と WeCom の送信 API を非同期に呼び出します。コールバックは 5 秒以内に応答し、AI の返信は別途送ります。本番利用前に企業認証を済ませ、サーバーの公開 IP をアプリの信頼リストに登録します。

資料公開日 2026-10-26

できること

  • WeCom アプリに双方向の AI メッセージ経路を設定する

使う場面

  • WeCom のコールバックを受け、非同期に返信したいとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

この WeCom アダプターのコールバック、認証、非同期返信の設定を説明してください

利用条件

スキルのドキュメントの記載に基づいて整理したもので、実際のインストールや動作は検証していません。

認証に関する注意
WeCom のアプリ・コールバック用認証情報と OpenClaw ゲートウェイ設定が必要です。APP_SECRET と AGENT_SECRET / EncodingAESKey は用途が異なります。
設定の要件
  • 公開 HTTPS コールバックが必要です。一時的な Cloudflare Tunnel は再起動で URL が変わり切断もあるため、本番には安定した接続先を用います。

月次の推移

ダウンロード数1446
487100215172026-03 · ダウンロード数 5582026-05 · ダウンロード数 9682026-07 · ダウンロード数 12062026-08 · ダウンロード数 12682026-09 · ダウンロード数 144626-0326-09
スター数-
0112026-03 · スター数 -2026-05 · スター数 -2026-07 · スター数 -2026-08 · スター数 -2026-09 · スター数 -26-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-091446—-
2026-081268+5.1%-
2026-071206—-
2026-05968—-
2026-03558—-

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

5.1 KB・ClawHub v1.0.0
---
name: wecom-openclaw
description: Integrate WeChat Work (Enterprise WeChat) with OpenClaw for intelligent messaging. Enables receiving messages from WeChat Work, processing them with Claude AI, and sending async replies. Handles msg_signature verification, AES-256-CBC encryption/decryption, and secure token-based authentication. Use when setting up bidirectional WeChat Work ↔ OpenClaw communication.
---

# WeChat Work → OpenClaw Adapter

## Quick Start

```bash
すべて表示(全 124 行)
# 1. Deploy
bash <skill_dir>/scripts/deploy.sh

# 2. Edit .env with your WeChat Work credentials
nano ~/wecom-adapter/.env

# 3. Start
cd ~/wecom-adapter && npm start

# 4. Expose publicly
cloudflared tunnel --url http://localhost:8090

# 5. Copy tunnel URL → WeChat Work admin → webhook URL
```

## Architecture

```
WeChat Work → HTTPS → Cloudflare Tunnel → Node.js Adapter (8090)
                                              ├─ Verify msg_signature (SHA1)
                                              ├─ Decrypt message (AES-256-CBC)
                                              ├─ Return "success" within 5s
                                              └─ Async: call OpenClaw → send reply via WeCom API
```

**Key**: Adapter returns `success` immediately, then sends AI reply asynchronously via WeChat Work's `message/send` API. This avoids the 5-second timeout.

## ⚠️ Critical Gotchas (Learned the Hard Way)

### 1. Parameter name is `msg_signature`, NOT `signature`

WeChat Work sends `?msg_signature=xxx`, not `?signature=xxx`. Reading `req.query.signature` will always be `undefined`.

### 2. Signature must include echostr/encrypt

**GET verification**: `SHA1(sort([token, timestamp, nonce, echostr]))`
**POST messages**: `SHA1(sort([token, timestamp, nonce, encrypt]))`

NOT `SHA1(sort([token, timestamp, nonce]))` — the encrypted payload MUST participate in the signature.

### 3. echostr must be DECRYPTED before returning

WeChat Work sends an AES-encrypted echostr. You must:
1. Verify msg_signature
2. AES-256-CBC decrypt the echostr
3. Strip PKCS#7 padding
4. Extract message from format: `16-byte random + 4-byte length (BE) + message + CorpID`
5. Return the **decrypted message** (not the raw echostr)

### 4. APP_SECRET ≠ EncodingAESKey

- **APP_SECRET** (应用密钥): Used to get `access_token` for sending messages
- **AGENT_SECRET / EncodingAESKey**: Used for AES encryption/decryption
- These are TWO DIFFERENT keys from the WeChat Work console

### 5. Express body parser must accept multiple Content-Types

WeChat Work may send XML as `text/xml`, `application/xml`, or other types:
```javascript
app.use(express.text({ type: ['application/xml', 'text/xml', 'text/plain', '*/*'] }));
```

### 6. Async reply pattern is mandatory

WeChat Work requires response within 5 seconds. AI responses take 5-30s. Solution:
1. Return `res.status(200).send('success')` immediately
2. Call OpenClaw asynchronously
3. Send reply via `POST /cgi-bin/message/send?access_token=xxx`

### 7. IP whitelist required for sending messages

WeChat Work API (`qyapi.weixin.qq.com`) requires your server's public IP in the app's trusted IP list. Error `60020` means IP not whitelisted.

### 8. Enterprise verification required

⚠️ **Unverified enterprises risk account suspension.** WeChat may ban accounts that use API automation without proper enterprise verification. Complete verification before production use.

### 9. Cloudflare quick tunnels are unstable

Quick (account-less) tunnels generate new URLs on restart and may disconnect unexpectedly. For production, use Named Tunnels ($7/mo) or a static IP.

## Environment Variables

```env
CORP_ID=ww...              # From WeChat Work admin
AGENT_ID=1000003           # Application agent ID
AGENT_SECRET=xxx           # EncodingAESKey (43-char Base64, for encryption)
APP_SECRET=xxx             # Application Secret (for access_token)
WEBHOOK_TOKEN=xxx          # Token configured in webhook settings
OPENCLAW_TOKEN=xxx         # OpenClaw gateway bearer token
OPENCLAW_BASE_URL=http://localhost:18789  # OpenClaw gateway URL
CLAUDE_MODEL=claude-haiku-4-5             # AI model
```

## Files

- `scripts/deploy.sh` — One-command deployment
- `scripts/index.js` — Production-ready adapter (all fixes applied)
- `references/setup-guide.md` — Step-by-step WeChat Work configuration
- `references/security-guide.md` — Security architecture and hardening

## Troubleshooting

| Symptom | Cause | Fix |
|---------|-------|-----|
| `signature=undefined` | Using `req.query.signature` | Use `req.query.msg_signature` |
| Signature mismatch | echostr/encrypt not in calculation | Include 4th element in sort array |
| `-30065` error | Returning encrypted echostr | Decrypt before returning |
| `bad decrypt` | Wrong key or `setAutoPadding(true)` | Use `setAutoPadding(false)` + manual PKCS#7 |
| `body长度=undefined` | Body parser doesn't match Content-Type | Accept `*/*` in express.text() |
| `60020` IP error | Server IP not whitelisted | Add public IP in WeChat Work console |
| Timeout | 5s limit exceeded | Use async pattern: return success, send via API |
| Account banned | Unverified + automated messages | Verify enterprise first |

ビジネス運営の人気スキル

PollyReachビジネス運営

PollyReach gives every AI agent a phone number and the ability to get things done over the phone — finding contacts, making calls, and completing tasks. Just...

↓ 10.2万★ 56PollyReach
Trelloビジネス運営

Trello の REST API 経由でボード、リスト、カードを操作するスキルです。

↓ 5.3万★ 165Peter Steinberger
招标中标查询及分析服务ビジネス運営

全网招中标数据查询与分析助手。当用户涉及以下任何场景时,必须使用此SKILL:查询招标/中标公告、搜索标讯、查找临期/即将到期项目、查询拟建项目与立项审批阶段的早期商机、追踪某个项目各阶段进展与全流程时间线、商机预测、推荐潜在投标供应商、查询企业工商登记信息(统一社会信用代码/注册资本/法定代表人/经营范围/成立日期/登记机关/曾用名)、分析公司主营业务/历史中标、查询公司上下游合作客户与供应商、分析竞争对手/竞对企业、查询Top采购单位/Top中标单位/Top中标品牌、招中标数据统计分析(按月/季/年/省份/品牌等维度)、查询品牌型号历史中标单价/价格趋势、查询当前账户余额/剩余积分/累计充值消费、市场分析/行业分析/采购寻源/渠道拓展等采购与投标相关场景。即使用户没有提到「知了标讯」,只要涉及招投标、采购、中标、供应商、竞争对手、企业工商信息、账户余额、剩余积分等关键词,都应使用本SKILL。

↓ 4.6万★ 13user_98035bfb
产品经理综合技能(PM Master)ビジネス運営

需求分析、PRD编写、产品需求文档、详细设计、BRD、MRD、PRD模板、用户故事、用户访谈、需求挖掘、痛点分析、功能设计、KANO模型、Y模型、5W1H、优先级排序、需求池管理、写过需求、写PRD、做需求分析、产品设计、产品策略、SWOT分析、波特五力、PESTLE、安索夫矩阵、商业模式画布、价值主张、产品愿景、OKR制定、Sprint规划、回顾会、发布说明、干系人管理、竞品分析、市场调研、用户研究、机会解决方案树、指标看板、测试场景、头脑风暴、假设验证

↓ 3.4万★ 343user_dec48685
Calendarビジネス運営

カレンダー管理と会議の日程調整を行うスキルです。

↓ 2.7万★ 9NDCCCCCC
Market Analysis CN | 市场分析服务ビジネス運営

市場動向、競合、ユーザー行動を分析する市場分析サービスです。

↓ 2.7万★ 32Guohongbin
电商选品ビジネス運営

电商平台爆款产品筛选分析 - 基于数据分析的智能选品工具,支持淘宝、京东、拼多多、抖音、亚马逊等平台

↓ 2.6万★ 77user_c2b88a14
Salesforceビジネス運営

Salesforce CRM API integration with managed OAuth. Install only if you need Salesforce CRM administration. Connect with the narrowest Salesforce permissions available, prefer sandbox orgs for destructive or batch work, verify the intended connection ID before each request, etc.

↓ 2.5万★ 8byungkyu

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。