npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openclaw-channel-dingding-webhook-connections

v0.1.5

Published

OpenClaw channel: HTTP webhook in, DingTalk robot webhook out (dynamic webhook URL per request)

Readme

openclaw-channel-dingding-webhook-connections

OpenClaw 通道:外部服务 HTTP POST 把文本送进网关,Agent 回复按请求体里的钉钉 webhookUrl 发回群。

安装、更新与重启

openclaw plugins install openclaw-channel-dingding-webhook-connections
openclaw plugins update dingding-webhook-connections
openclaw gateway restart

首次安装只需执行 install;已安装后要升级插件执行 update(二选一,不必每次都跑两条)。安装或更新插件、以及修改网关配置后,请执行 openclaw gateway restart,通道与 Webhook 才会按最新状态生效。

配置(Raw JSON)

在网关配置里切换到 Raw / 原始 JSON,把下面 channels.dingding-webhook-connections 合并进现有 JSON(勿删掉其它通道;没有 channels 时可在根上新增该键):

{
  "channels": {
    "dingding-webhook-connections": {
      "channelAccessToken": "<access_token>"
    }
  }
}

<access_token> 换成钉钉机器人的 access_token(与 Webhook URL 里 access_token= 后那一段相同)。请求头 x-channel-access-token 也传同一串,用于校验调用方。
HTTP 入口路径固定:/dingding-webhook-connections/webhook(不可配置)。

保存配置后执行:openclaw gateway restart

调用 Claw(POST)

URL: https://<网关>/dingding-webhook-connections/webhook

请求头: Content-Type: application/jsonx-channel-access-token 的值须与配置里的 channelAccessToken 完全一致(直接传钉钉 access_token 即可)。

请求体: 下面 JSON 里 URL 中的 <access_token> 与配置、x-channel-access-token同一串text 为送入 Agent 的文案。

{"schemaVersion":1,"event":"message.received","webhookUrl":"https://oapi.dingtalk.com/robot/send?access_token=<access_token>","text":"我正在测试自定义channel,请回复我你是谁以及服务环境,并提示当你收到这条信息就代表通道正常。"}

webhookUrl 须为 https://oapi.dingtalk.com 且含 /robot/send

请求体可选字段(与 schemaVersion / event / webhookUrl / text 并列):

| 字段 | 说明 | |------|------| | groupName | 字符串。传入时用作 Claw 侧群组/会话展示名ConversationLabel / 群主题等);不传则使用默认 DingTalk:<短id>。 | | atMobiles | 字符串数组。Agent 回复发到钉钉时,在消息里 @ 对应手机号(钉钉机器人 at.atMobiles)。 | | atUserIds | 字符串数组。回复时 @ 对应 useridat.atUserIds)。 | | isAtAll | 布尔,true 时回复中 @所有人(须与机器人在群内权限一致)。 |

@ 参数仅作用于本轮入站之后 Agent 的回复;多段长文回复时仅在最后一段附带 at,避免重复打扰。

响应: 校验通过后立即返回 HTTP 200,body 为 {"ok":true,"accepted":true};入站消息在后台交给 Agent,HTTP 连接马上结束(避免长时间占用导致客户端超时重试、重复投递)。请勿依赖同步响应判断 Agent 是否已回复钉钉。

会话 key:webhookUrl 生成 16 位十六进制短 peer id;出站回复依赖网关进程内缓存。若仅重启网关后要从控制台向旧会话发消息,需先再收到一条该 Webhook 的入站以刷新缓存。

快速测试(curl): 三处 <access_token> 换成同一实际值。

curl -X POST 'https://<网关>/dingding-webhook-connections/webhook' \
  -H 'Content-Type: application/json' \
  -H 'x-channel-access-token: <access_token>' \
  -d '{"schemaVersion":1,"event":"message.received","webhookUrl":"https://oapi.dingtalk.com/robot/send?access_token=<access_token>","text":"我正在测试自定义channel,请回复我你是谁以及服务环境,并提示当你收到这条信息就代表通道正常。"}'

钉钉加签

本插件出站不带钉钉加签参数;机器人若开启加签、未配关键词/IP 等,可能被钉钉拒收,请在钉钉侧增加自定义关键词等方式兼容。