前置说明
这次接入不需要依赖复杂的工作流,也无需将服务暴露在公网,本地环境即可跑通。
核心步骤
1. 准备插件
首先去官方仓库确认一下最新的 Connector 代码: DingTalk MoltBot Connector
2. 修改项目配置
在项目的 package.json 里增加 MoltBot 的配置项,指定插件路径和通道:
{
"moltbot": {
"extensions": ["./plugin.ts"],
"channels": ["dingtalk-connector"],
"installDependencies": true
}
}
3. 安装依赖
执行命令安装钉钉连接器插件:
moltbot plugins install dingtalk-moltbot-connector
4. 配置网关与凭证
编辑本地配置文件 ~/.moltbot/moltbot.json。如果文件已存在,直接补充或修改对应字段即可。这里需要填入你在钉钉开放平台获取的 AppKey 和 AppSecret:
{
"channels": {
"dingtalk-connector": {
"enabled": true,
"clientId":

