@@ -375,36 +375,55 @@ The plugin supports OpenAI-compatible API providers. If not configured in the pl
375375
376376| Field | Type | Required | Default | Description |
377377| -------| ------| ----------| ---------| -------------|
378- | ` enabled ` | boolean | No | ` false ` | Enable WeChat notifications via @tencent-weixin/openclaw-weixin plugin |
379- | ` receiver_id ` | string | No | - | WeChat receiver ID (format: ` xxx@im.wechat ` ) |
378+ | ` enabled ` | boolean | No | ` true ` | Enable WeChat notifications via @tencent-weixin/openclaw-weixin plugin |
379+ | ` receiver_id ` | string | No | Auto-detect | WeChat receiver ID (format: ` xxx@im.wechat ` ) |
380380| ` bot_account_id ` | string | No | - | WeChat bot account ID (format: ` xxx-im-bot ` ) |
381381
382+ ** receiver_id Auto-Detection:**
383+
384+ The plugin will automatically detect ` receiver_id ` using the following priority (no manual configuration needed in most cases):
385+
386+ 1 . ** Plugin Config** : ` plugins.openclaw-github-trending.config.channels.wechat.receiver_id `
387+ 2 . ** Environment Variable** : ` OPENCLAW_WECHAT_RECEIVER_ID `
388+ 3 . ** Message Context** : If current session is from WeChat, auto-reply to sender
389+ 4 . ** Session History** : Extract from ` ~/.openclaw/agents/main/sessions/sessions.json `
390+ 5 . ** OpenClaw Config** : Search WeChat plugin configuration and sessions
391+
392+ ** ⚠️ Important:**
393+ - WeChat ID is ** case-sensitive** , e.g., ` o9cq806Il_QmHA022BUNXe0hUv4I@im.wechat `
394+ - If auto-detection fails, detailed configuration guide will be shown
395+
382396** WeChat Requirements:**
383397
3843981 . ** Install WeChat Plugin** :
385399 ``` bash
386- npm install @tencent-weixin/openclaw-weixin
400+ openclaw plugins install @tencent-weixin/openclaw-weixin
387401 ```
388402
3894032 . ** Configure in OpenClaw** (` ~/.openclaw/openclaw.json ` ):
390404 ``` json
391405 {
392406 "plugins" : {
393407 "entries" : {
394- "@tencent-weixin/openclaw-weixin" : {
395- "enabled" : true ,
396- "config" : {
397- "enable_login" : true
398- }
399- },
408+ "openclaw-weixin" : {
409+ "enabled" : true
410+ }
411+ }
412+ }
413+ }
414+ ```
415+
416+ 3 . ** Optional: Configure receiver_id** (only if you need to push to a specific user):
417+ ``` json
418+ {
419+ "plugins" : {
420+ "entries" : {
400421 "openclaw-github-trending" : {
401- "enabled" : true ,
402422 "config" : {
403423 "channels" : {
404424 "wechat" : {
405425 "enabled" : true ,
406- "receiver_id" : " xxx@im.wechat" ,
407- "bot_account_id" : " xxx-im-bot"
426+ "receiver_id" : " o9cq806Il_QmHA022BUNXe0hUv4I@im.wechat"
408427 }
409428 }
410429 }
@@ -414,38 +433,24 @@ The plugin supports OpenAI-compatible API providers. If not configured in the pl
414433 }
415434 ```
416435
417- 3 . ** Configuration Options (choose one)** :
418- - ** Config File (Recommended)** : Set ` receiver_id ` and ` bot_account_id ` in the ` wechat ` section of ` openclaw.json `
419- - ** Environment Variables** : Set ` OPENCLAW_WECHAT_RECEIVER_ID ` and ` OPENCLAW_WECHAT_BOT_ACCOUNT_ID `
420- - ** Default Values** : Use built-in default configuration (for testing only)
436+ ** 💡 Tip** : If ` receiver_id ` is not configured, the plugin will auto-detect it from session history.
421437
422- 4 . ** Login to WeChat** :
423- - OpenClaw will prompt you to scan QR code with your personal WeChat
424- - After login, messages will be sent to the configured WeChat account
438+ ** 🔍 How to Get Your WeChat ID:**
425439
426- 5 . ** Usage** :
427- ** ⚠️ Important: WeChat notifications are only supported in OpenClaw chat context, not in CLI mode (` openclaw gen-cron ` command)**
440+ ``` bash
441+ # Method 1: Check OpenClaw session history
442+ cat ~ /.openclaw/agents/main/sessions/sessions.json | jq ' to_entries[] | select(.key | contains("wechat")) | {key, lastTo}'
428443
429- ** Use in OpenClaw Chat** (Recommended):
430- ``` text
431- Use openclaw-github-trending tool to get today's trending and push to WeChat
432- or
433- Run immediately: Fetch today's trending and push to WeChat
434- ```
444+ # Method 2: Check message send records
445+ cat ~ /.openclaw/agents/main/sessions/sessions.json | grep -i " o9cq.*@im.wechat"
435446
436- ** Create scheduled task in chat** :
437- ``` bash
438- openclaw cron add --name " GitHub Trending Daily WeChat" \
439- --cron " 0 18 * * *" \
440- --system-event ' {"tool":"openclaw-github-trending","params":{"since":"daily","channels":["wechat"]}}'
441- ```
447+ # Method 3: Send a test message and check logs
448+ openclaw message send --channel openclaw-weixin --target " your-wechat-id" " test"
449+ ```
442450
443- ** Notes:**
444- - WeChat notifications are sent as markdown messages to your personal WeChat account
445- - Messages include new repositories (with full AI summaries) and trending repositories (with brief summaries)
446- - WeChat functionality depends on the ` executeTool ` API provided by @tencent-weixin/openclaw-weixin plugin
447- - CLI mode will return an error when using WeChat channel
448- - If the WeChat plugin is not installed or configured, the plugin will show a warning but continue with other channels
451+ ** ⚠️ Notes:**
452+ - WeChat ID format: ` o9cq806Il_QmHA022BUNXe0hUv4I@im.wechat ` (case-sensitive!)
453+ - If auto-detection fails, error message includes detailed configuration guide
449454
450455* Required when using this channel
451456
0 commit comments