n8n-nodes-wecom 0.1.33 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -199
- package/dist/credentials/WeComApi.credentials.js +13 -9
- package/dist/credentials/WeComApi.credentials.js.map +1 -1
- package/dist/credentials/WeComReceiveApi.credentials.js +14 -4
- package/dist/credentials/WeComReceiveApi.credentials.js.map +1 -1
- package/dist/nodes/WeCom/resources/wedoc/createDoc.js +41 -0
- package/dist/nodes/WeCom/resources/wedoc/createDoc.js.map +1 -1
- package/dist/nodes/WeCom/resources/wedoc/execute.js +7 -0
- package/dist/nodes/WeCom/resources/wedoc/execute.js.map +1 -1
- package/dist/nodes/WeComTrigger/WeComTrigger.node.js +13 -2
- package/dist/nodes/WeComTrigger/WeComTrigger.node.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
这是一个 n8n 社区节点,让你可以在 [n8n](https://n8n.io/) 工作流中使用企业微信(WeChat Work)API。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 节点分类
|
|
6
6
|
|
|
7
7
|
本插件按照企业微信官方文档的分类结构,提供以下节点:
|
|
8
8
|
|
|
@@ -34,17 +34,18 @@
|
|
|
34
34
|
- **会议室管理** - 会议室和会议室预定管理
|
|
35
35
|
- **紧急通知** - 语音电话等紧急通知
|
|
36
36
|
|
|
37
|
-
### 3.
|
|
38
|
-
|
|
39
|
-
接收企业微信的消息和事件推送
|
|
40
|
-
|
|
41
|
-
### 4. 企业微信-连接微信
|
|
37
|
+
### 3. 企业微信-连接微信
|
|
42
38
|
|
|
43
39
|
包含企业微信连接微信的功能:
|
|
44
40
|
|
|
45
41
|
- **客户联系** - 客户管理、标签、继承、客户群、朋友圈、群发等
|
|
46
42
|
- **微信客服** - 客服账号、接待人员、消息收发、统计管理
|
|
47
43
|
|
|
44
|
+
|
|
45
|
+
### 4. 企业微信消息接收(Trigger)
|
|
46
|
+
|
|
47
|
+
接收企业微信的消息和事件推送
|
|
48
|
+
|
|
48
49
|
## 隐私与安全
|
|
49
50
|
|
|
50
51
|
**本插件完全基于企业微信官方 API 开发,直连企业微信服务器,不经过任何第三方服务器。**
|
|
@@ -69,7 +70,7 @@ npm install n8n-nodes-wecom
|
|
|
69
70
|
|
|
70
71
|
## 凭证配置
|
|
71
72
|
|
|
72
|
-
###
|
|
73
|
+
### 消息推送凭证(WebHook URL)
|
|
73
74
|
|
|
74
75
|
**消息推送**功能用于通过群机器人 Webhook 发送消息到企业微信群聊
|
|
75
76
|
|
|
@@ -80,7 +81,7 @@ npm install n8n-nodes-wecom
|
|
|
80
81
|
3. 创建一个机器人并复制 Webhook 地址
|
|
81
82
|
4. 在 n8n 中配置"企业微信群机器人 Webhook"凭证,填入 Webhook 地址
|
|
82
83
|
|
|
83
|
-
###
|
|
84
|
+
### 获取企业微信请求凭证(消息发送、通讯录、素材管理等功能需要)
|
|
84
85
|
|
|
85
86
|
1. 登录 [企业微信管理后台](https://work.weixin.qq.com/)
|
|
86
87
|
2. 进入"我的企业" > "企业信息",复制 **企业ID (CorpID)**
|
|
@@ -88,138 +89,23 @@ npm install n8n-nodes-wecom
|
|
|
88
89
|
4. 复制 **AgentId**(应用ID)
|
|
89
90
|
5. 点击"查看Secret",复制 **Secret**
|
|
90
91
|
|
|
91
|
-
###
|
|
92
|
-
|
|
93
|
-
根据使用的节点类型选择对应的凭证:
|
|
94
|
-
|
|
95
|
-
#### 企业微信-基础 节点
|
|
96
|
-
|
|
97
|
-
1. 添加"企业微信-基础"节点到工作流
|
|
98
|
-
2. 根据选择的资源类型配置凭证:
|
|
99
|
-
|
|
100
|
-
**通讯录、应用消息、群聊会话、企业互联、素材管理:**
|
|
101
|
-
- 点击"Credential to connect with"
|
|
102
|
-
- 选择"创建新凭证 - 企业微信 API"
|
|
103
|
-
- 填入以下信息:
|
|
104
|
-
- **企业 ID** - 你的企业 CorpID
|
|
105
|
-
- **应用 Secret** - 应用的 Secret
|
|
106
|
-
- **应用 ID** - 应用的 AgentID
|
|
107
|
-
|
|
108
|
-
**消息推送(群机器人):**
|
|
109
|
-
- 点击"Credential to connect with"
|
|
110
|
-
- 选择"创建新凭证 - 企业微信群机器人 Webhook API"
|
|
111
|
-
- 填入群机器人的 Webhook URL
|
|
112
|
-
|
|
113
|
-
#### 企业微信-办公 节点
|
|
114
|
-
|
|
115
|
-
1. 添加"企业微信-办公"节点到工作流
|
|
116
|
-
2. 点击"Credential to connect with"
|
|
117
|
-
3. 选择"创建新凭证 - 企业微信 API"
|
|
118
|
-
4. 填入企业凭证信息(同上)
|
|
119
|
-
|
|
120
|
-
#### 企业微信-连接微信 节点
|
|
121
|
-
|
|
122
|
-
1. 添加"企业微信-连接微信"节点到工作流
|
|
123
|
-
2. 点击"Credential to connect with"
|
|
124
|
-
3. 选择"创建新凭证 - 企业微信 API"
|
|
125
|
-
4. 填入企业凭证信息(同上)
|
|
126
|
-
|
|
127
|
-
#### 企业微信消息接收 Trigger 节点
|
|
128
|
-
|
|
129
|
-
1. 添加"企业微信消息接收"触发器节点
|
|
130
|
-
2. 点击"Credential to connect with"
|
|
131
|
-
3. 选择"创建新凭证 - 企业微信消息接收 API"
|
|
132
|
-
4. 填入以下信息:
|
|
133
|
-
- **企业 ID** - 你的企业 CorpID
|
|
134
|
-
- **Token** - 你将在企业微信后台设置的 Token(两边必须一致)
|
|
135
|
-
- **EncodingAESKey** - 你将在企业微信后台设置的密钥(两边必须一致,43位字符)
|
|
136
|
-
5. 复制节点的 Webhook URL
|
|
137
|
-
6. 在企业微信应用管理后台配置接收消息时,使用**相同的** Token 和 EncodingAESKey
|
|
138
|
-
|
|
139
|
-
**被动回复消息配置:**
|
|
140
|
-
|
|
141
|
-
如果需要在接收到用户消息后自动回复,可以启用"被动回复消息"功能:
|
|
142
|
-
|
|
143
|
-
1. 在触发器节点中,启用"被动回复消息"选项
|
|
144
|
-
2. 选择回复消息类型(文本、图片、语音、视频、图文)
|
|
145
|
-
3. 配置对应的字段名称
|
|
146
|
-
4. 在工作流中通过后续节点设置回复内容到指定字段
|
|
147
|
-
|
|
148
|
-
**注意事项:**
|
|
149
|
-
|
|
150
|
-
- 被动回复消息会自动进行加密和签名,无需手动处理
|
|
151
|
-
- 如果未在工作流中设置相应字段,文本消息会返回默认内容"感谢您的消息,我们已收到!"
|
|
152
|
-
- 媒体类型消息必须先通过素材管理接口上传获得 media_id,否则会报错
|
|
153
|
-
- 图文消息需要提供包含 Title、Url 等字段的数组
|
|
154
|
-
- 被动回复失败时会在输出数据的 `_passiveReplyError` 字段中记录错误信息
|
|
155
|
-
|
|
156
|
-
## 💡 使用技巧
|
|
92
|
+
### 获取企业微信消息接收凭证
|
|
157
93
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
- 添加标签成员时,可以先选择标签,再选择要添加的成员
|
|
174
|
-
|
|
175
|
-
#### 企业微信-连接微信 节点
|
|
176
|
-
|
|
177
|
-
- ✅ **客服账号选择**:自动获取已创建的客服账号列表
|
|
178
|
-
|
|
179
|
-
**使用方法**:在客服相关操作中,`客服账号` 字段会显示为下拉列表,显示客服账号名称,选择后自动填入 `open_kfid`。
|
|
180
|
-
|
|
181
|
-
**支持的操作**:
|
|
182
|
-
- 添加/删除接待人员
|
|
183
|
-
- 获取接待人员列表
|
|
184
|
-
- 发送客服消息
|
|
185
|
-
- 分配客服会话
|
|
186
|
-
- 获取客服账号链接
|
|
187
|
-
- 修改/删除客服账号
|
|
188
|
-
- 获取客服数据统计
|
|
189
|
-
|
|
190
|
-
**优势**:
|
|
191
|
-
- 🎯 **直观便捷**:显示友好的名称,无需记忆和查找 ID
|
|
192
|
-
- 🚀 **提升效率**:配置时间从 5-10 分钟缩短到 1-2 分钟
|
|
193
|
-
- ✅ **减少错误**:避免手动输入 ID 导致的错误
|
|
194
|
-
- 🔄 **实时同步**:自动获取最新的企业微信数据
|
|
195
|
-
|
|
196
|
-
**表达式支持**:所有动态选项字段仍支持通过 [n8n 表达式](https://docs.n8n.io/code/expressions/) 输入动态值,确保向后兼容和灵活性。
|
|
197
|
-
|
|
198
|
-
### 获取ID的方法
|
|
199
|
-
|
|
200
|
-
对于暂不支持动态选项的字段(如审批模板ID、日历ID等),可通过以下方式获取:
|
|
201
|
-
|
|
202
|
-
1. **审批模板ID**:
|
|
203
|
-
- 登录企业微信管理后台
|
|
204
|
-
- 进入"应用管理" > "自建" > 选择应用 > "审批"
|
|
205
|
-
- 在模板列表中查看模板ID
|
|
206
|
-
|
|
207
|
-
2. **日历ID**:
|
|
208
|
-
- 通过"创建日历"操作获取返回的 `cal_id`
|
|
209
|
-
- 在后续工作流中使用该ID
|
|
210
|
-
|
|
211
|
-
3. **文档ID**:
|
|
212
|
-
- 通过"新建文档"操作获取返回的 `docid`
|
|
213
|
-
- 在后续工作流中使用该ID
|
|
214
|
-
|
|
215
|
-
4. **空间ID**:
|
|
216
|
-
- 通过"创建空间"操作获取返回的 `spaceid`
|
|
217
|
-
- 在后续工作流中使用该ID
|
|
218
|
-
|
|
219
|
-
5. **会议室ID**:
|
|
220
|
-
- 登录企业微信管理后台
|
|
221
|
-
- 进入"工作台" > "会议室"
|
|
222
|
-
- 查看会议室列表中的 ID
|
|
94
|
+
1. 登录 [企业微信管理后台](https://work.weixin.qq.com/)
|
|
95
|
+
2. 进入"我的企业" > "企业信息",复制 **企业ID (CorpID)**
|
|
96
|
+
3. 进入"应用管理" > 选择或创建一个应用
|
|
97
|
+
4. 复制 **AgentId**(应用ID,例如:1000001)
|
|
98
|
+
5. 启用 **API接收消息**,设置Token、EncodingAESKey
|
|
99
|
+
6. 在 n8n 中创建"企业微信消息接收 Trigger"节点:
|
|
100
|
+
- 配置凭证(企业ID、应用ID、Token、EncodingAESKey)
|
|
101
|
+
- **Path** 表示 Webhook URL 的路径,建议使用应用 ID
|
|
102
|
+
- 保存节点后,查看生成的 Webhook URL(例如:`https://your-n8n.com/webhook/1000001`)
|
|
103
|
+
7. 将 Webhook URL 填入企业微信后台的**接收消息服务器配置**中
|
|
104
|
+
|
|
105
|
+
**重要提示**:
|
|
106
|
+
- 企业微信每个应用只能配置一个接收消息 URL
|
|
107
|
+
- 多个工作流可以使用同一个凭证(同一应用ID),它们会共享同一个 Webhook URL 接收消息
|
|
108
|
+
- 不同应用请创建不同的凭证,使用不同的应用ID
|
|
223
109
|
|
|
224
110
|
## 已实现功能
|
|
225
111
|
|
|
@@ -229,9 +115,9 @@ npm install n8n-nodes-wecom
|
|
|
229
115
|
|
|
230
116
|
## 一、基础功能(企业微信-基础 节点)
|
|
231
117
|
|
|
232
|
-
###
|
|
118
|
+
### 消息接收(Trigger 节点)
|
|
233
119
|
|
|
234
|
-
>
|
|
120
|
+
> [官方文档:接收消息与事件](https://developer.work.weixin.qq.com/document/path/90238)
|
|
235
121
|
|
|
236
122
|
**接收消息功能:**
|
|
237
123
|
|
|
@@ -249,7 +135,7 @@ npm install n8n-nodes-wecom
|
|
|
249
135
|
|
|
250
136
|
**被动回复消息功能:**
|
|
251
137
|
|
|
252
|
-
>
|
|
138
|
+
> [官方文档:被动回复消息](https://developer.work.weixin.qq.com/document/path/90241)
|
|
253
139
|
|
|
254
140
|
- ✅ [被动回复文本消息](https://developer.work.weixin.qq.com/document/path/90241)
|
|
255
141
|
- ✅ [被动回复图片消息](https://developer.work.weixin.qq.com/document/path/90241)
|
|
@@ -261,12 +147,12 @@ npm install n8n-nodes-wecom
|
|
|
261
147
|
|
|
262
148
|
**回调机制参考文档:**
|
|
263
149
|
|
|
264
|
-
-
|
|
265
|
-
-
|
|
150
|
+
- [回调机制说明](https://developer.work.weixin.qq.com/document/path/92520)
|
|
151
|
+
- [回调机制示例代码](https://developer.work.weixin.qq.com/document/path/92521)
|
|
266
152
|
|
|
267
|
-
###
|
|
153
|
+
### 消息推送(群机器人)
|
|
268
154
|
|
|
269
|
-
>
|
|
155
|
+
> [官方文档:消息推送配置说明](https://developer.work.weixin.qq.com/document/path/99110)
|
|
270
156
|
|
|
271
157
|
- ✅ 发送文本消息
|
|
272
158
|
- ✅ 发送 Markdown 消息
|
|
@@ -279,9 +165,9 @@ npm install n8n-nodes-wecom
|
|
|
279
165
|
- 文本通知模板卡片
|
|
280
166
|
- 图文展示模板卡片
|
|
281
167
|
|
|
282
|
-
###
|
|
168
|
+
### 应用消息发送
|
|
283
169
|
|
|
284
|
-
>
|
|
170
|
+
> [官方文档:发送应用消息](https://developer.work.weixin.qq.com/document/path/90236)
|
|
285
171
|
|
|
286
172
|
- ✅ 发送文本消息
|
|
287
173
|
- ✅ 发送 Markdown 消息
|
|
@@ -299,9 +185,9 @@ npm install n8n-nodes-wecom
|
|
|
299
185
|
- ✅ [撤回应用消息](https://developer.work.weixin.qq.com/document/path/94867)
|
|
300
186
|
- ✅ [更新模板卡片消息](https://developer.work.weixin.qq.com/document/path/94888)
|
|
301
187
|
|
|
302
|
-
###
|
|
188
|
+
### 群聊会话
|
|
303
189
|
|
|
304
|
-
>
|
|
190
|
+
> [官方文档:应用发送消息到群聊会话](https://developer.work.weixin.qq.com/document/path/90244)
|
|
305
191
|
|
|
306
192
|
- ✅ [创建群聊会话](https://developer.work.weixin.qq.com/document/path/90245)
|
|
307
193
|
- ✅ [获取群聊会话信息](https://developer.work.weixin.qq.com/document/path/98914)
|
|
@@ -313,9 +199,9 @@ npm install n8n-nodes-wecom
|
|
|
313
199
|
- 发送 Markdown 消息到群聊
|
|
314
200
|
- 发送图文消息到群聊
|
|
315
201
|
|
|
316
|
-
###
|
|
202
|
+
### 通讯录管理
|
|
317
203
|
|
|
318
|
-
>
|
|
204
|
+
> [官方文档:通讯录管理](https://developer.work.weixin.qq.com/document/path/90193)
|
|
319
205
|
|
|
320
206
|
#### 成员管理
|
|
321
207
|
|
|
@@ -353,7 +239,7 @@ npm install n8n-nodes-wecom
|
|
|
353
239
|
|
|
354
240
|
#### 账号ID转换
|
|
355
241
|
|
|
356
|
-
>
|
|
242
|
+
> [官方文档:账号 ID](https://developer.work.weixin.qq.com/document/path/98728)
|
|
357
243
|
|
|
358
244
|
- ✅ [用户ID转OpenID](https://developer.work.weixin.qq.com/document/path/90202)
|
|
359
245
|
- ✅ [OpenID转用户ID](https://developer.work.weixin.qq.com/document/path/90202)
|
|
@@ -361,7 +247,7 @@ npm install n8n-nodes-wecom
|
|
|
361
247
|
|
|
362
248
|
#### 异步导入接口
|
|
363
249
|
|
|
364
|
-
>
|
|
250
|
+
> [官方文档:异步导入接口](https://developer.work.weixin.qq.com/document/path/90979)
|
|
365
251
|
|
|
366
252
|
- ✅ [增量更新成员](https://developer.work.weixin.qq.com/document/path/90980)
|
|
367
253
|
- ✅ [全量覆盖成员](https://developer.work.weixin.qq.com/document/path/90981)
|
|
@@ -370,7 +256,7 @@ npm install n8n-nodes-wecom
|
|
|
370
256
|
|
|
371
257
|
#### 异步导出接口
|
|
372
258
|
|
|
373
|
-
>
|
|
259
|
+
> [官方文档:异步导出接口](https://developer.work.weixin.qq.com/document/path/94850)
|
|
374
260
|
|
|
375
261
|
- ✅ [导出成员](https://developer.work.weixin.qq.com/document/path/94849)
|
|
376
262
|
- ✅ [导出成员详情](https://developer.work.weixin.qq.com/document/path/94851)
|
|
@@ -378,9 +264,9 @@ npm install n8n-nodes-wecom
|
|
|
378
264
|
- ✅ [导出标签成员](https://developer.work.weixin.qq.com/document/path/94853)
|
|
379
265
|
- ✅ [获取导出结果](https://developer.work.weixin.qq.com/document/path/94854)
|
|
380
266
|
|
|
381
|
-
###
|
|
267
|
+
### 素材管理
|
|
382
268
|
|
|
383
|
-
>
|
|
269
|
+
> [官方文档:素材管理](https://developer.work.weixin.qq.com/document/path/91054)
|
|
384
270
|
|
|
385
271
|
- ✅ [上传临时素材](https://developer.work.weixin.qq.com/document/path/90253)
|
|
386
272
|
- ✅ [上传图片](https://developer.work.weixin.qq.com/document/path/90256)
|
|
@@ -390,9 +276,9 @@ npm install n8n-nodes-wecom
|
|
|
390
276
|
- ✅ 上传永久素材
|
|
391
277
|
- ✅ 获取永久素材
|
|
392
278
|
|
|
393
|
-
###
|
|
279
|
+
### 企业互联
|
|
394
280
|
|
|
395
|
-
>
|
|
281
|
+
> [官方文档:企业互联](https://developer.work.weixin.qq.com/document/path/93360)
|
|
396
282
|
|
|
397
283
|
#### 企业互联基础接口
|
|
398
284
|
|
|
@@ -402,7 +288,7 @@ npm install n8n-nodes-wecom
|
|
|
402
288
|
|
|
403
289
|
#### 上下游基础接口
|
|
404
290
|
|
|
405
|
-
>
|
|
291
|
+
> [官方文档:上下游](https://developer.work.weixin.qq.com/document/path/97213)
|
|
406
292
|
|
|
407
293
|
- ✅ [获取应用共享信息](https://developer.work.weixin.qq.com/document/path/95813)
|
|
408
294
|
- ✅ [获取下级/下游企业的access_token](https://developer.work.weixin.qq.com/document/path/95816)
|
|
@@ -427,25 +313,16 @@ npm install n8n-nodes-wecom
|
|
|
427
313
|
- ✅ [新增对接规则](https://developer.work.weixin.qq.com/document/path/95634)
|
|
428
314
|
- ✅ [更新对接规则](https://developer.work.weixin.qq.com/document/path/95635)
|
|
429
315
|
|
|
430
|
-
###
|
|
316
|
+
### 系统
|
|
431
317
|
|
|
432
|
-
>
|
|
318
|
+
> [官方文档:获取企业微信服务器IP段](https://developer.work.weixin.qq.com/document/path/92520)
|
|
433
319
|
|
|
434
320
|
- ✅ [获取企业微信接口IP段](https://developer.work.weixin.qq.com/document/path/92520)
|
|
435
321
|
- ✅ [获取企业微信回调IP段](https://developer.work.weixin.qq.com/document/path/92521)
|
|
436
322
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
这些接口用于获取企业微信服务器的IP地址段,可用于:
|
|
440
|
-
|
|
441
|
-
- **安全配置**:将获取到的IP段添加到防火墙白名单,只允许企业微信服务器访问
|
|
442
|
-
- **接口调用安全**:配置API接口IP段白名单,防止非法调用
|
|
443
|
-
- **回调安全**:配置回调服务器IP段白名单,确保只接收来自企业微信官方服务器的回调请求
|
|
444
|
-
- **网络隔离**:在专网或VPN环境中,只开放对企业微信服务器IP段的访问权限
|
|
445
|
-
|
|
446
|
-
### 🤝 客户联系
|
|
323
|
+
### 客户联系
|
|
447
324
|
|
|
448
|
-
>
|
|
325
|
+
> [官方文档:客户联系](https://developer.work.weixin.qq.com/document/path/92109)
|
|
449
326
|
|
|
450
327
|
#### 企业服务人员管理
|
|
451
328
|
|
|
@@ -498,7 +375,7 @@ npm install n8n-nodes-wecom
|
|
|
498
375
|
|
|
499
376
|
#### 客户朋友圈
|
|
500
377
|
|
|
501
|
-
>
|
|
378
|
+
> [官方文档:客户朋友圈概述](https://developer.work.weixin.qq.com/document/path/93506)
|
|
502
379
|
|
|
503
380
|
- ✅ [企业发表内容到客户的朋友圈](https://developer.work.weixin.qq.com/document/path/95094)
|
|
504
381
|
- ✅ [停止发表企业朋友圈](https://developer.work.weixin.qq.com/document/path/97612)
|
|
@@ -530,9 +407,9 @@ npm install n8n-nodes-wecom
|
|
|
530
407
|
- ✅ [获客助手](https://developer.work.weixin.qq.com/document/path/97297)(链接管理、客户信息、额度统计)
|
|
531
408
|
- ✅ [获取已服务的外部联系人](https://developer.work.weixin.qq.com/document/path/99434)
|
|
532
409
|
|
|
533
|
-
###
|
|
410
|
+
### 电子发票
|
|
534
411
|
|
|
535
|
-
>
|
|
412
|
+
> [官方文档:电子发票](https://developer.work.weixin.qq.com/document/path/90283)
|
|
536
413
|
|
|
537
414
|
- ✅ [查询电子发票](https://developer.work.weixin.qq.com/document/path/90284)
|
|
538
415
|
- ✅ [更新发票状态](https://developer.work.weixin.qq.com/document/path/90285)
|
|
@@ -543,9 +420,9 @@ npm install n8n-nodes-wecom
|
|
|
543
420
|
|
|
544
421
|
## 二、办公功能(企业微信-办公 节点)
|
|
545
422
|
|
|
546
|
-
###
|
|
423
|
+
### 邮件管理
|
|
547
424
|
|
|
548
|
-
>
|
|
425
|
+
> [官方文档:邮件](https://developer.work.weixin.qq.com/document/path/95486)
|
|
549
426
|
|
|
550
427
|
#### 发送邮件
|
|
551
428
|
|
|
@@ -597,7 +474,7 @@ npm install n8n-nodes-wecom
|
|
|
597
474
|
- ✅ [更改用户功能属性](https://developer.work.weixin.qq.com/document/path/98008)
|
|
598
475
|
- ✅ [获取邮件未读数](https://developer.work.weixin.qq.com/document/path/95514)
|
|
599
476
|
|
|
600
|
-
###
|
|
477
|
+
### 文档管理
|
|
601
478
|
|
|
602
479
|
#### 管理文档
|
|
603
480
|
|
|
@@ -666,9 +543,9 @@ npm install n8n-nodes-wecom
|
|
|
666
543
|
|
|
667
544
|
- ✅ [上传文档图片](https://developer.work.weixin.qq.com/document/path/99933)
|
|
668
545
|
|
|
669
|
-
###
|
|
546
|
+
### 日程管理
|
|
670
547
|
|
|
671
|
-
>
|
|
548
|
+
> [官方文档:日程](https://developer.work.weixin.qq.com/document/path/93647)
|
|
672
549
|
|
|
673
550
|
#### 管理日历
|
|
674
551
|
|
|
@@ -688,9 +565,9 @@ npm install n8n-nodes-wecom
|
|
|
688
565
|
- ✅ [获取日程详情](https://developer.work.weixin.qq.com/document/path/97724)
|
|
689
566
|
- ✅ [取消日程](https://developer.work.weixin.qq.com/document/path/97725)
|
|
690
567
|
|
|
691
|
-
###
|
|
568
|
+
### 会议管理
|
|
692
569
|
|
|
693
|
-
>
|
|
570
|
+
> [官方文档:会议](https://developer.work.weixin.qq.com/document/path/99104)
|
|
694
571
|
|
|
695
572
|
#### 预约会议基础管理
|
|
696
573
|
|
|
@@ -730,9 +607,9 @@ npm install n8n-nodes-wecom
|
|
|
730
607
|
- ✅ [取消高级功能账号](https://developer.work.weixin.qq.com/document/path/99509)
|
|
731
608
|
- ✅ [获取高级功能账号列表](https://developer.work.weixin.qq.com/document/path/99510)
|
|
732
609
|
|
|
733
|
-
###
|
|
610
|
+
### 微盘管理
|
|
734
611
|
|
|
735
|
-
>
|
|
612
|
+
> [官方文档:微盘](https://developer.work.weixin.qq.com/document/path/93654)
|
|
736
613
|
|
|
737
614
|
#### 空间管理
|
|
738
615
|
|
|
@@ -765,9 +642,9 @@ npm install n8n-nodes-wecom
|
|
|
765
642
|
- ✅ [获取文件权限信息](https://developer.work.weixin.qq.com/document/path/97979)
|
|
766
643
|
- ✅ [文件安全设置](https://developer.work.weixin.qq.com/document/path/97980)
|
|
767
644
|
|
|
768
|
-
###
|
|
645
|
+
### 打卡管理
|
|
769
646
|
|
|
770
|
-
>
|
|
647
|
+
> [官方文档:打卡](https://developer.work.weixin.qq.com/document/path/90262)
|
|
771
648
|
|
|
772
649
|
- ✅ [获取企业所有打卡规则](https://developer.work.weixin.qq.com/document/path/93384)
|
|
773
650
|
- ✅ [获取员工打卡规则](https://developer.work.weixin.qq.com/document/path/90263)
|
|
@@ -782,9 +659,9 @@ npm install n8n-nodes-wecom
|
|
|
782
659
|
- ✅ [获取设备打卡数据](https://developer.work.weixin.qq.com/document/path/94126)
|
|
783
660
|
- ✅ [管理打卡规则](https://developer.work.weixin.qq.com/document/path/98041)
|
|
784
661
|
|
|
785
|
-
###
|
|
662
|
+
### 审批管理
|
|
786
663
|
|
|
787
|
-
>
|
|
664
|
+
> [官方文档:审批](https://developer.work.weixin.qq.com/document/path/91854)
|
|
788
665
|
|
|
789
666
|
- ✅ [获取审批模板详情](https://developer.work.weixin.qq.com/document/path/91982)
|
|
790
667
|
- ✅ [提交审批申请](https://developer.work.weixin.qq.com/document/path/91853)
|
|
@@ -796,26 +673,26 @@ npm install n8n-nodes-wecom
|
|
|
796
673
|
- ✅ [创建审批模板](https://developer.work.weixin.qq.com/document/path/97437)
|
|
797
674
|
- ✅ [更新审批模板](https://developer.work.weixin.qq.com/document/path/97438)
|
|
798
675
|
|
|
799
|
-
###
|
|
676
|
+
### 汇报管理
|
|
800
677
|
|
|
801
|
-
>
|
|
678
|
+
> [官方文档:汇报](https://developer.work.weixin.qq.com/document/path/93496)
|
|
802
679
|
|
|
803
680
|
- ✅ [批量获取汇报记录单号](https://developer.work.weixin.qq.com/document/path/93393)
|
|
804
681
|
- ✅ [获取汇报记录详情](https://developer.work.weixin.qq.com/document/path/93394)
|
|
805
682
|
- ✅ [获取汇报统计数据](https://developer.work.weixin.qq.com/document/path/93395)
|
|
806
683
|
- ✅ [下载微盘文件](https://developer.work.weixin.qq.com/document/path/98021)
|
|
807
684
|
|
|
808
|
-
###
|
|
685
|
+
### 人事助手
|
|
809
686
|
|
|
810
|
-
>
|
|
687
|
+
> [官方文档:人事助手](https://developer.work.weixin.qq.com/document/path/99130)
|
|
811
688
|
|
|
812
689
|
- ✅ [获取员工字段配置](https://developer.work.weixin.qq.com/document/path/99131)
|
|
813
690
|
- ✅ [获取员工花名册信息](https://developer.work.weixin.qq.com/document/path/99132)
|
|
814
691
|
- ✅ [更新员工花名册信息](https://developer.work.weixin.qq.com/document/path/99133)
|
|
815
692
|
|
|
816
|
-
###
|
|
693
|
+
### 会议室管理
|
|
817
694
|
|
|
818
|
-
>
|
|
695
|
+
> [官方文档:会议室](https://developer.work.weixin.qq.com/document/path/93618)
|
|
819
696
|
|
|
820
697
|
- ✅ [会议室管理](https://developer.work.weixin.qq.com/document/path/93619)(添加、编辑、删除、查询、列表)
|
|
821
698
|
- ✅ [会议室预定管理](https://developer.work.weixin.qq.com/document/path/93620)(预定、取消、查询、列表)
|
|
@@ -823,9 +700,9 @@ npm install n8n-nodes-wecom
|
|
|
823
700
|
- ✅ [获取申请单详细信息](https://developer.work.weixin.qq.com/document/path/99885)
|
|
824
701
|
- ✅ [设置审批单审批信息](https://developer.work.weixin.qq.com/document/path/99880)
|
|
825
702
|
|
|
826
|
-
###
|
|
703
|
+
### 紧急通知应用
|
|
827
704
|
|
|
828
|
-
>
|
|
705
|
+
> [官方文档:紧急通知](https://developer.work.weixin.qq.com/document/path/91623)
|
|
829
706
|
|
|
830
707
|
- ✅ [发起语音电话](https://developer.work.weixin.qq.com/document/path/91627)
|
|
831
708
|
- ✅ [获取接听状态](https://developer.work.weixin.qq.com/document/path/91628)
|
|
@@ -834,9 +711,9 @@ npm install n8n-nodes-wecom
|
|
|
834
711
|
|
|
835
712
|
## 三、连接微信功能(企业微信-连接微信 节点)
|
|
836
713
|
|
|
837
|
-
###
|
|
714
|
+
### 微信客服
|
|
838
715
|
|
|
839
|
-
>
|
|
716
|
+
> [官方文档:微信客服](https://developer.work.weixin.qq.com/document/path/94638)
|
|
840
717
|
|
|
841
718
|
#### 客服账号管理
|
|
842
719
|
|
|
@@ -875,6 +752,8 @@ npm install n8n-nodes-wecom
|
|
|
875
752
|
## 参考资源
|
|
876
753
|
|
|
877
754
|
- [企业微信开发文档](https://developer.work.weixin.qq.com/document/)
|
|
755
|
+
- [企业微信API全局错误码](https://developer.work.weixin.qq.com/document/path/90313)
|
|
756
|
+
- [常见问题 - FAQ](https://developer.work.weixin.qq.com/document/path/90315)
|
|
878
757
|
- [n8n 官方文档](https://docs.n8n.io/)
|
|
879
758
|
- [n8n 社区节点开发文档](https://docs.n8n.io/integrations/creating-nodes/overview/)
|
|
880
759
|
- [n8n 社区节点开发示例](https://docs.n8n.io/integrations/creating-nodes/build/declarative-style-node/)
|
|
@@ -14,25 +14,28 @@ class WeComApi {
|
|
|
14
14
|
type: 'string',
|
|
15
15
|
default: '',
|
|
16
16
|
required: true,
|
|
17
|
-
description: '企业微信的企业 ID
|
|
17
|
+
description: '企业微信的企业 ID',
|
|
18
|
+
hint: '在"管理后台 - 我的企业 - 企业信息"中查看'
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
|
-
displayName: '应用
|
|
21
|
-
name: '
|
|
21
|
+
displayName: '应用 ID (Agent ID)',
|
|
22
|
+
name: 'agentId',
|
|
22
23
|
type: 'string',
|
|
23
|
-
typeOptions: { password: true },
|
|
24
24
|
default: '',
|
|
25
25
|
required: true,
|
|
26
|
-
description: '
|
|
26
|
+
description: '应用的唯一标识',
|
|
27
|
+
hint: '在"应用管理 - 自建应用"中查看'
|
|
27
28
|
},
|
|
28
29
|
{
|
|
29
|
-
displayName: '应用
|
|
30
|
-
name: '
|
|
30
|
+
displayName: '应用 Secret',
|
|
31
|
+
name: 'corpSecret',
|
|
31
32
|
type: 'string',
|
|
33
|
+
typeOptions: { password: true },
|
|
32
34
|
default: '',
|
|
33
35
|
required: true,
|
|
34
|
-
description: '
|
|
35
|
-
|
|
36
|
+
description: '应用的密钥',
|
|
37
|
+
hint: '在"应用管理 - 自建应用"中查看,注意应用需要是启用状态'
|
|
38
|
+
}
|
|
36
39
|
];
|
|
37
40
|
this.authenticate = {
|
|
38
41
|
type: 'generic',
|
|
@@ -40,6 +43,7 @@ class WeComApi {
|
|
|
40
43
|
};
|
|
41
44
|
this.test = {
|
|
42
45
|
request: {
|
|
46
|
+
method: 'GET',
|
|
43
47
|
baseURL: 'https://qyapi.weixin.qq.com',
|
|
44
48
|
url: '/cgi-bin/gettoken',
|
|
45
49
|
qs: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeComApi.credentials.js","sourceRoot":"","sources":["../../credentials/WeComApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,QAAQ;IAArB;QACC,SAAI,GAAG,UAAU,CAAC;QAElB,gBAAW,GAAG,UAAU,CAAC;QAGzB,SAAI,GAAS,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAC;QAExF,qBAAgB,GAAG,0DAA0D,CAAC;QAE9E,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,iBAAiB;gBAC9B,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"WeComApi.credentials.js","sourceRoot":"","sources":["../../credentials/WeComApi.credentials.ts"],"names":[],"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AAE,SAAS;wBACd,KAAK,EAAE,CAAC;wBACR,OAAO,EAAE,2BAA2B;qBACpC;iBACD;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAtED,4BAsEC"}
|
|
@@ -18,6 +18,16 @@ class WeComReceiveApi {
|
|
|
18
18
|
description: '企业微信的企业 ID(CorpID)',
|
|
19
19
|
hint: '在企业微信管理后台 - 我的企业 - 企业信息中获取',
|
|
20
20
|
},
|
|
21
|
+
{
|
|
22
|
+
displayName: '应用 ID (Agent ID)',
|
|
23
|
+
name: 'agentId',
|
|
24
|
+
type: 'string',
|
|
25
|
+
default: '',
|
|
26
|
+
required: true,
|
|
27
|
+
placeholder: '1000001',
|
|
28
|
+
description: '应用的唯一标识',
|
|
29
|
+
hint: '在"应用管理 - 自建应用"中查看',
|
|
30
|
+
},
|
|
21
31
|
{
|
|
22
32
|
displayName: 'Token',
|
|
23
33
|
name: 'token',
|
|
@@ -25,8 +35,8 @@ class WeComReceiveApi {
|
|
|
25
35
|
default: '',
|
|
26
36
|
required: true,
|
|
27
37
|
placeholder: 'your_token_here',
|
|
28
|
-
description: '
|
|
29
|
-
hint: '
|
|
38
|
+
description: '企业微信后台"接收消息"配置中自己设置的 Token,两边必须完全一致。用于自动验证消息签名,防止伪造请求',
|
|
39
|
+
hint: '可由企业任意填写,用于生成签名',
|
|
30
40
|
typeOptions: { password: true },
|
|
31
41
|
},
|
|
32
42
|
{
|
|
@@ -39,8 +49,8 @@ class WeComReceiveApi {
|
|
|
39
49
|
default: '',
|
|
40
50
|
required: true,
|
|
41
51
|
placeholder: '43位随机字符串(可在企业微信后台点击"随机生成")',
|
|
42
|
-
description: '
|
|
43
|
-
hint: '
|
|
52
|
+
description: '企业微信后台"接收消息"配置中设置的密钥(43位字符),两边必须完全一致。用于自动解密消息内容',
|
|
53
|
+
hint: '用于消息体的加密,长度固定为43个字符',
|
|
44
54
|
},
|
|
45
55
|
];
|
|
46
56
|
this.authenticate = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeComReceiveApi.credentials.js","sourceRoot":"","sources":["../../credentials/WeComReceiveApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,eAAe;IAA5B;QACC,SAAI,GAAG,iBAAiB,CAAC;QAEzB,gBAAW,GAAG,cAAc,CAAC;QAE7B,qBAAgB,GAAG,0DAA0D,CAAC;QAE9E,SAAI,GAAG,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,8BAA8B,EAAW,CAAC;QAE3F,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,oBAAoB;gBACjC,WAAW,EAAE,oBAAoB;gBACjC,IAAI,EAAE,4BAA4B;aAClC;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iBAAiB;gBAC9B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"WeComReceiveApi.credentials.js","sourceRoot":"","sources":["../../credentials/WeComReceiveApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,eAAe;IAA5B;QACC,SAAI,GAAG,iBAAiB,CAAC;QAEzB,gBAAW,GAAG,cAAc,CAAC;QAE7B,qBAAgB,GAAG,0DAA0D,CAAC;QAE9E,SAAI,GAAG,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,8BAA8B,EAAW,CAAC;QAE3F,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,oBAAoB;gBACjC,WAAW,EAA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