SkillHub

openclaw-wechat-mp-guide

v1.0.1

微信公众号接入指南 - OpenClaw 连接公众号完整教程。适合:自媒体运营、内容创作者。

Sourced from ClawHub, Authored by yang1002378395-cmyk

Installation

Please help me install the skill `openclaw-wechat-mp-guide` from SkillHub official store. npx skills add yang1002378395-cmyk/openclaw-wechat-mp-guide

微信公众号接入指南

让 AI 助手连接微信公众号,自动回复用户消息。

前置条件

  1. 微信公众号(服务号或订阅号)
  2. OpenClaw 已安装
  3. 公网服务器(80/443 端口)

步骤 1:获取公众号凭证

  1. 登录 微信公众平台
  2. 进入「开发」→「基本配置」
  3. 记录以下信息:
AppID:wxxxxxxxxxxx
AppSecret:xxxxxxxxxxxxxxxxxxxxxxxx

步骤 2:配置服务器

  1. 进入「基本配置」→「服务器配置」
  2. 填写:
  3. URL:https://your-server.com/wechat
  4. Token:自定义(如 openclaw2024
  5. EncodingAESKey:随机生成
  6. 消息加解密方式:安全模式

步骤 3:配置 OpenClaw

# 设置微信连接
openclaw connect wechat

# 输入凭证
AppID: wxxxxxxxxxxx
AppSecret: xxxxxxxxxxxxxxxxxxxxxxxx
Token: openclaw2024
EncodingAESKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# 启动服务
openclaw start

步骤 4:验证连接

在公众号后台点击「提交」,系统会验证服务器配置。

成功后,用户发消息给公众号,AI 会自动回复。

功能说明

自动回复

用户发送任何消息,AI 根据内容智能回复。

关键词触发

# ~/.openclaw/config.yaml
wechat:
  keywords:
    "帮助": "我是 AI 助手,可以回答你的问题..."
    "价格": "请查看我们的价格表..."

菜单配置

通过公众号后台设置自定义菜单,点击后触发 AI 对话。

高级功能

多客服转接

wechat:
  transfer_keywords:
    - "人工"
    - "客服"
  transfer_message: "正在转接人工客服,请稍候..."

消息统计

# 查看消息统计
openclaw stats wechat

敏感词过滤

wechat:
  sensitive_words:
    - "违禁词1"
    - "违禁词2"
  filter_action: "replace"  # 或 "block"

常见问题

Q: 服务器配置提交失败?

检查: 1. URL 是否可访问 2. Token 是否一致 3. 服务器是否启动

Q: 消息无响应?

检查日志:

openclaw logs -f | grep wechat

Q: 如何处理图片消息?

需要开通「接收图片消息」权限,AI 可以识别图片内容并回复。

定价参考

  • 公众号接入:¥199
  • 高级配置:¥499
  • 企业定制:¥1999

需要帮助?

联系:微信 yang1002378395 或 Telegram @yangster151


提示:订阅号接口受限较多,建议使用服务号获得完整功能。