diff --git a/docs/config/handbook.ts b/docs/config/handbook.ts
index 64f01c362..cd9737bd3 100644
--- a/docs/config/handbook.ts
+++ b/docs/config/handbook.ts
@@ -1360,6 +1360,29 @@ export default [
},
],
},
+ {
+ title: 'Synchronize',
+ 'title.zh-CN': '同步',
+ children: [
+ {
+ title: 'Overview',
+ 'title.zh-CN': '概述',
+ link: '/handbook/user-data-sync',
+ },
+ {
+ title: 'User manual',
+ 'title.zh-CN': '使用手册',
+ link: '/handbook/user-data-sync/manual',
+ },
+ {
+ title: 'Development',
+ 'title.zh-CN': '开发指南',
+ children: [
+ '/handbook/user-data-sync/dev/guide',
+ ],
+ },
+ ],
+ }
],
},
{
@@ -1530,6 +1553,11 @@ export default [
'title.ja-JP': '通知:メール',
link: '/handbook/notification-email',
},
+ {
+ title: 'Notification: WeCom',
+ 'title.zh-CN': '通知:企业微信',
+ link: '/handbook/notification-wecom',
+ },
],
},
{
diff --git a/docs/en-US/handbook/auth-wecom/index.md b/docs/en-US/handbook/auth-wecom/index.md
index 6ee4d2737..2e7cb566f 100644
--- a/docs/en-US/handbook/auth-wecom/index.md
+++ b/docs/en-US/handbook/auth-wecom/index.md
@@ -64,10 +64,13 @@ Click on "Add new" and select "WeCom" from the list.
### Configuration Steps
-![](https://static-docs.nocobase.com/202406272116978.png)
+![](./static/screenshot-wecom-config1.png)
+
+![](./static/screenshot-wecom-config2.png)
- When a phone number does not match an existing user, should a new user be created automatically - When the phone number does not match an existing user, a new user is automatically created.
- "Company ID, "AgentId" And "Secret" - Enter the key information copied in the previous step.
+- Automatic login - After enabling this option, open the application links in the WeCom chat dialog will automatically log in, and the application links can also be configured on the home page of the workbench application, and only one WeCom authenticator can enable this option.
- Workbench application homepage link - Enter the Workbench application homepage link, then copy and proceed to the next step.
## Configuring the WeCom Application Homepage
@@ -78,6 +81,21 @@ In the WeCom admin console, paste the previously copied Workbench application ho
![](https://static-docs.nocobase.com/202406272123048.png)
+## Configure the home page of the WeCom mobile client.
+
+### Method one
+
+Open the WeCom login configuration, set the Workbench app redirect link to the mobile page path, and copy the Workbench app home page link, then configure this link into the WeCom app.
+
+![](./static/screenshot-wecom-config3.png)
+
+### Method two
+
+Open the WeCom login configuration, enable automatic login, and configure the system's mobile link within the WeCom app.
+
+![](./static/screenshot-wecom-config4.png)
+![](./static/screenshot-wecom-config5.png)
+
## Logging In
To log in, visit the NocoBase login page and click the button below the login form to start the third-party authentication process.
diff --git a/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config1.png b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config1.png
new file mode 100644
index 000000000..198977631
Binary files /dev/null and b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config1.png differ
diff --git a/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config2.png b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config2.png
new file mode 100644
index 000000000..0783d4e2b
Binary files /dev/null and b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config2.png differ
diff --git a/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config3.png b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config3.png
new file mode 100644
index 000000000..9cdb04058
Binary files /dev/null and b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config3.png differ
diff --git a/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config4.png b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config4.png
new file mode 100644
index 000000000..856e73762
Binary files /dev/null and b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config4.png differ
diff --git a/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config5.png b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config5.png
new file mode 100644
index 000000000..a7a91fb8b
Binary files /dev/null and b/docs/en-US/handbook/auth-wecom/static/screenshot-wecom-config5.png differ
diff --git a/docs/en-US/handbook/notification-wecom/index.md b/docs/en-US/handbook/notification-wecom/index.md
new file mode 100644
index 000000000..bc9f9e4f1
--- /dev/null
+++ b/docs/en-US/handbook/notification-wecom/index.md
@@ -0,0 +1,66 @@
+# Notification: WeCom
+
+
+
+## Introduction
+
+Send notifications through the WeCom channel.
+
+## User Manual
+
+### Install and enable the auth-wecom plugin, and configure wecom authentication
+
+[auth: wecom](https://docs.nocobase.com/plugins/auth-wecom)
+
+### WeCom channel configuration
+
+![20241020112236](./static/20241020112236.png)
+
+![](./static/screenshot-wecom-config6.png)
+
+- Authenticator - Authenticator, Configured WeCom authenticator
+
+### Workflow notification configuration
+
+The WeCom channel currently supports three types of messages in workflow notifications: Text card message, Markdown message, and Template card message - Text notice. For details on each message type, please refer to [the documentation](https://developer.work.weixin.qq.com/document/path/90236).
+
+#### Text card message
+
+![](./static/screenshot-wecom-config9.png)
+
+WeCom documentation:[Text card message](https://developer.work.weixin.qq.com/document/path/90236#%E6%96%87%E6%9C%AC%E5%8D%A1%E7%89%87%E6%B6%88%E6%81%AF)
+
+#### Markdown message
+
+![](./static/screenshot-wecom-config10.png)
+
+WeCom documentation:[Markdown message](https://developer.work.weixin.qq.com/document/path/90236#markdown%E6%B6%88%E6%81%AF)
+
+#### Template card message - text notice
+
+Before using template card messages, you need to set up a message callback first.
+
+Go to the WeCom application management backend and find the message reception configuration.
+
+![](./static/screenshot-wecom-config11.png)
+
+After entering the configuration page, generate the Token and EncodingAESKey.
+
+![](./static/screenshot-wecom-config12.png)
+
+Open the system and set up the synchronization of WeCom user data.
+
+![](./static/screenshot-wecom-config13.png)
+
+The basic configuration parameters should be consistent with the selected WeCom authentication configuration. Enter the Token and EncodingAESKey generated in the WeCom application backend, enable the settings, and submit to save. After saving, reopen the configuration information, copy the directory callback notification link, and paste it into the URL field of the message reception configuration in the Enterprise WeCom configuration, then save the message reception settings.
+
+![](./static/screenshot-wecom-config14.png)
+
+After completing the above steps, you can then configure the notifications.
+
+![](./static/screenshot-wecom-config7.png)
+
+![](./static/screenshot-wecom-config8.png)
+
+WeCom documentation:[Template card message - text notice](https://developer.work.weixin.qq.com/document/path/90236#%E6%96%87%E6%9C%AC%E9%80%9A%E7%9F%A5%E5%9E%8B)
+
diff --git a/docs/en-US/handbook/notification-wecom/static/20241020112236.png b/docs/en-US/handbook/notification-wecom/static/20241020112236.png
new file mode 100644
index 000000000..b6aa71574
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/20241020112236.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config10.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config10.png
new file mode 100644
index 000000000..890124b6f
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config10.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config11.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config11.png
new file mode 100644
index 000000000..6ccb09708
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config11.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config12.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config12.png
new file mode 100644
index 000000000..2c26757ff
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config12.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config13.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config13.png
new file mode 100644
index 000000000..d6c5bacf2
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config13.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config14.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config14.png
new file mode 100644
index 000000000..178d0872a
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config14.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config6.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config6.png
new file mode 100644
index 000000000..20d2437cf
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config6.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config7.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config7.png
new file mode 100644
index 000000000..978c47486
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config7.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config8.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config8.png
new file mode 100644
index 000000000..2bd1cf030
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config8.png differ
diff --git a/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config9.png b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config9.png
new file mode 100644
index 000000000..bec61876e
Binary files /dev/null and b/docs/en-US/handbook/notification-wecom/static/screenshot-wecom-config9.png differ
diff --git a/docs/en-US/handbook/user-data-sync/dev/guide.md b/docs/en-US/handbook/user-data-sync/dev/guide.md
new file mode 100644
index 000000000..c6d5d9e3a
--- /dev/null
+++ b/docs/en-US/handbook/user-data-sync/dev/guide.md
@@ -0,0 +1,145 @@
+# Extend User Data Source Type
+
+## Overview
+
+NocoBase supports extending user data source types as needed.
+
+## Server
+
+### Interface
+
+NocoBase provides registration and management for extending synchronization data source types. To extend the core logic processing, it is necessary to inherit the `SyncSource` abstract class provided by the plugin and implement the corresponding standard interfaces.
+
+```ts
+import { SyncSource, UserData } from '@nocobase/plugin-user-data-sync';
+
+class CustomSyncSource extends SyncSource {
+ async pull(): Promise {
+ return [];
+ }
+}
+```
+
+The `SyncSource` provides an `options` property that is used to retrieve custom configurations for the data source.
+
+```ts
+import { SyncSource, UserData } from '@nocobase/plugin-user-data-sync';
+
+class CustomSyncSource extends SyncSource {
+ async pull(): Promise {
+ //...
+ const { appid, secret } = this.options;
+ //...
+ return [];
+ }
+}
+```
+
+### Explanation of the UserData Field
+
+| Field | Description |
+| -------- | ---------------------- |
+| `dataType` | Data type, with optional values of `user` and `department` |
+| `uniqueKey` | Unique identifier field |
+| `records` | Data record |
+| `sourceName` | Source name |
+
+If dataType is `user`, then records contain the following fields:
+
+| Field | Description |
+| -------- | ---------------------- |
+| `id` | User ID |
+| `nickname` | User nickname |
+| `avatar` | User avatar |
+| `email` | Email |
+| `phone` | Phone number |
+| `departments` | Array of Department IDs |
+
+If dataType is `department`, then records contain the following fields:
+
+| Field | Description |
+| -------- | ---------------------- |
+| `id` | Department ID |
+| `name` | Department name |
+| `parentId` | Parent department ID |
+
+### Complete Example of Implementing the Interface
+
+```ts
+import { SyncSource, UserData } from '@nocobase/plugin-user-data-sync';
+
+class CustomSyncSource extends SyncSource {
+ async pull(): Promise {
+ // ...
+ const ThirdClientApi = new ThirdClientApi(this.options.appid, this.options.secret);
+ const departments = await this.clientapi.getDepartments();
+ const users = await this.clientapi.getUsers();
+ // ...
+ return [
+ {
+ dataType: 'department',
+ uniqueKey: 'id',
+ records: departments,
+ sourceName: this.instance.name,
+ },
+ {
+ dataType: 'user',
+ uniqueKey: 'id',
+ records: users,
+ sourceName: this.instance.name,
+ },
+ ];
+ }
+}
+```
+
+### Registration of Data Source Types
+
+Extended data sources need to be registered with the data management module.
+
+```ts
+import UserDataSyncPlugin from '@nocobase/plugin-user-data-sync';
+
+class CustomSourcePlugin extends Plugin {
+ async load() {
+ const syncPlugin = this.app.pm.get(UserDataSyncPlugin) as UserDataSyncPlugin;
+ if (syncPlugin) {
+ syncPlugin.sourceManager.reigsterType('custom-source-type', {
+ syncSource: CustomSyncSource,
+ title: 'Custom Source',
+ });
+ }
+ }
+}
+```
+
+## Client
+
+The client user interface is registered through the `registerType` interface provided by the user data synchronization plugin client.
+
+```ts
+import SyncPlugin from '@nocobase/plugin-user-data-sync/client';
+
+class CustomSourcePlugin extends Plugin {
+ async load() {
+ const sync = this.app.pm.get(SyncPlugin);
+ sync.registerType(authType, {
+ components: {
+ AdminSettingsForm, // Backend management form
+ },
+ });
+ }
+}
+```
+
+### Backend Management Form
+
+![](./static/20240813135430.png)
+
+The upper part is the general data source configuration, and the lower part is the customizable configuration form section that can be registered.
+
+## Data Push From Third-party Systems
+
+Third-party systems can also push data to Nocobase through the Nocobase HTTP API to achieve user data synchronization.
+
+For detailed API documentation, please visit the API documentation page: http://localhost:13000/admin/settings/api-doc/documentation
\ No newline at end of file
diff --git a/docs/en-US/handbook/user-data-sync/dev/static/20240813135430.png b/docs/en-US/handbook/user-data-sync/dev/static/20240813135430.png
new file mode 100644
index 000000000..0408f80e2
Binary files /dev/null and b/docs/en-US/handbook/user-data-sync/dev/static/20240813135430.png differ
diff --git a/docs/en-US/handbook/user-data-sync/index.md b/docs/en-US/handbook/user-data-sync/index.md
new file mode 100644
index 000000000..14fbe0138
--- /dev/null
+++ b/docs/en-US/handbook/user-data-sync/index.md
@@ -0,0 +1,11 @@
+# User Data Synchronization
+
+
+
+## Introduction
+
+Provide user data source management, user data synchronization interfaces, with data sources including DingTalk, WeCom, and others, which are also extensible. Currently, it can synchronize `user` and `department` data.
+
+## Installation
+
+Built-in plugin, no separate installation required.
\ No newline at end of file
diff --git a/docs/en-US/handbook/user-data-sync/manual.md b/docs/en-US/handbook/user-data-sync/manual.md
new file mode 100644
index 000000000..c52926b00
--- /dev/null
+++ b/docs/en-US/handbook/user-data-sync/manual.md
@@ -0,0 +1,40 @@
+# User Guide
+
+## User Data Source Management
+
+The user data synchronization plugin provides a management interface in the configuration center.
+
+![](./static/20240813134409.png)
+
+## Activate User Data Source
+
+Only activated data sources will display the sync and task buttons.
+
+![](./static/20240813134707.png)
+
+## Synchronize User Data
+
+After clicking the sync button, synchronization will start immediately.
+
+![](./static/20240813134818.png)
+
+After clicking the task button, you can view the list of synchronization tasks.
+
+![](./static/20240813135105.png)
+
+![](./static/20240813134110.png)
+
+In the task list, you can retry failed tasks by clicking on them to restart synchronization.
+
+![](./static/20240813134933.png)
+
+## User Data Source Type
+
+![](./static/20240813133944.png)
+
+Currently supported data source types include:
+
+- DingTalk, expanded by [dingtalk-auth plugin](../auth-dingtalk/index.md)
+- WeCom, expanded by [wecom-auth plugin](../auth-wecom/index.md)
+
+In addition, you can also expand user data source by yourself, refer to the [Developer's Guide](./dev/guide.md).
\ No newline at end of file
diff --git a/docs/en-US/handbook/user-data-sync/static/20240813133944.png b/docs/en-US/handbook/user-data-sync/static/20240813133944.png
new file mode 100644
index 000000000..d38cd9c87
Binary files /dev/null and b/docs/en-US/handbook/user-data-sync/static/20240813133944.png differ
diff --git a/docs/en-US/handbook/user-data-sync/static/20240813134110.png b/docs/en-US/handbook/user-data-sync/static/20240813134110.png
new file mode 100644
index 000000000..749f816ee
Binary files /dev/null and b/docs/en-US/handbook/user-data-sync/static/20240813134110.png differ
diff --git a/docs/en-US/handbook/user-data-sync/static/20240813134409.png b/docs/en-US/handbook/user-data-sync/static/20240813134409.png
new file mode 100644
index 000000000..620cefba2
Binary files /dev/null and b/docs/en-US/handbook/user-data-sync/static/20240813134409.png differ
diff --git a/docs/en-US/handbook/user-data-sync/static/20240813134707.png b/docs/en-US/handbook/user-data-sync/static/20240813134707.png
new file mode 100644
index 000000000..06ac25e69
Binary files /dev/null and b/docs/en-US/handbook/user-data-sync/static/20240813134707.png differ
diff --git a/docs/en-US/handbook/user-data-sync/static/20240813134818.png b/docs/en-US/handbook/user-data-sync/static/20240813134818.png
new file mode 100644
index 000000000..62f34f6ce
Binary files /dev/null and b/docs/en-US/handbook/user-data-sync/static/20240813134818.png differ
diff --git a/docs/en-US/handbook/user-data-sync/static/20240813134933.png b/docs/en-US/handbook/user-data-sync/static/20240813134933.png
new file mode 100644
index 000000000..beec12132
Binary files /dev/null and b/docs/en-US/handbook/user-data-sync/static/20240813134933.png differ
diff --git a/docs/en-US/handbook/user-data-sync/static/20240813135105.png b/docs/en-US/handbook/user-data-sync/static/20240813135105.png
new file mode 100644
index 000000000..9418351bf
Binary files /dev/null and b/docs/en-US/handbook/user-data-sync/static/20240813135105.png differ
diff --git a/docs/zh-CN/handbook/auth-wecom/index.md b/docs/zh-CN/handbook/auth-wecom/index.md
index c739ca85b..ef5a2f4c8 100644
--- a/docs/zh-CN/handbook/auth-wecom/index.md
+++ b/docs/zh-CN/handbook/auth-wecom/index.md
@@ -62,22 +62,42 @@
![](https://static-docs.nocobase.com/202406272115805.png)
-### 配置
+## 配置
+
+![](./static/screenshot-wecom-config1.png)
+
+![](./static/screenshot-wecom-config2.png)
-![](https://static-docs.nocobase.com/202406272116978.png)
- When a phone number does not match an existing user, should a new user be created automatically - 当使用手机号匹配不到已有用户时,是否自动创建新用户。
- Company ID, AgentId 和 Secret - 填写上一步复制的密钥信息。
+- Origin - 当前应用的域名。
+- Automatic login - 自动登录。启用此选项后,企微聊天对话框中打开系统链接会自动登录,同时工作台应用主页上可配置系统链接,只有一个企微认证器可开启该选项。
- Workbench application homepage link - 工作台应用主页链接,复制并进入下一步。
## 配置企业微信应用首页
-进入企业微信管理员后台,将复制的工作台应用主页链接填写到对应应用的应用主页地址栏。
+进入企业微信管理员后台,将复制的工作台应用主页链接填写到对应应用的应用主页地址栏。若开启的自动登录选项,则可以直接配置系统指定页面链接。
![](https://static-docs.nocobase.com/202406272123631.png)
![](https://static-docs.nocobase.com/202406272123048.png)
+## 配置企业微信移动端首页
+
+### 方法一
+
+打开企微登录配置,将工作台应用跳转链接配置为移动端页面路径,并复制工作台应用主页链接,将该链接配置到企微应用
+
+![](./static/screenshot-wecom-config3.png)
+
+### 方法二
+
+打开企微登录配置,启用自动登录,并且在企微应用中配置系统的移动端链接
+
+![](./static/screenshot-wecom-config4.png)
+![](./static/screenshot-wecom-config5.png)
+
## 登录
访问登录页面,点击登录表单下方按钮发起第三方登录。
diff --git a/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config1.png b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config1.png
new file mode 100644
index 000000000..198977631
Binary files /dev/null and b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config1.png differ
diff --git a/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config2.png b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config2.png
new file mode 100644
index 000000000..0783d4e2b
Binary files /dev/null and b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config2.png differ
diff --git a/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config3.png b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config3.png
new file mode 100644
index 000000000..9cdb04058
Binary files /dev/null and b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config3.png differ
diff --git a/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config4.png b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config4.png
new file mode 100644
index 000000000..856e73762
Binary files /dev/null and b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config4.png differ
diff --git a/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config5.png b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config5.png
new file mode 100644
index 000000000..a7a91fb8b
Binary files /dev/null and b/docs/zh-CN/handbook/auth-wecom/static/screenshot-wecom-config5.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/index.md b/docs/zh-CN/handbook/notification-wecom/index.md
new file mode 100644
index 000000000..6a1756c5a
--- /dev/null
+++ b/docs/zh-CN/handbook/notification-wecom/index.md
@@ -0,0 +1,66 @@
+# 通知:企业微信
+
+
+
+## 介绍
+
+通过企业微信渠道发送通知。
+
+## 使用手册
+
+### 安装并启用企微认证插件,并配置好企微认证
+
+[用户认证-企业微信](https://docs-cn.nocobase.com/plugins/auth-wecom)
+
+### 企业微信渠道配置
+
+![20241020112236](./static/20241020112236.png)
+
+![](./static/screenshot-wecom-config6.png)
+
+
+- Authenticator - 认证器,已配置的企业微信认证器
+
+### 工作流通知配置
+
+企业微信渠道在工作流通知中目前支持三种消息类型:文本卡片消息,Markdown消息,模板卡片消息-文本通知型,每种消息类型具体见[企业微信文档](https://developer.work.weixin.qq.com/document/path/90236)
+
+#### 文本卡片消息
+
+![](./static/screenshot-wecom-config9.png)
+
+企业微信文档:[文本卡片消息](https://developer.work.weixin.qq.com/document/path/90236#%E6%96%87%E6%9C%AC%E5%8D%A1%E7%89%87%E6%B6%88%E6%81%AF)
+
+#### Markdown消息
+
+![](./static/screenshot-wecom-config10.png)
+
+企业微信文档:[Markdown消息](https://developer.work.weixin.qq.com/document/path/90236#markdown%E6%B6%88%E6%81%AF)
+
+#### 模板卡片消息-文本通知型
+
+使用模板卡片消息前,需要先设置接受消息回调
+
+进入企业微信应用管理后台,找到接收消息配置
+
+![](./static/screenshot-wecom-config11.png)
+
+进入配置页面后,生成Token和EncodingAESKey
+
+![](./static/screenshot-wecom-config12.png)
+
+打开系统,并设置企业微信用户数据同步
+
+![](./static/screenshot-wecom-config13.png)
+
+基础配置参数与所选企业微信认证配置一致,并填入在企业微信应用后台生成的Token和EncodingAESKey,设置启用并提交保存。保存后再打开配置信息,复制通讯录回调通知链接,填入到企业微信应用配置的接受消息配置的URL字段中,保存接受消息配置
+
+![](./static/screenshot-wecom-config14.png)
+
+以上步骤完成后,即可配置通知
+
+![](./static/screenshot-wecom-config7.png)
+
+![](./static/screenshot-wecom-config8.png)
+
+企业微信文档:[模板卡片消息-文本通知型](https://developer.work.weixin.qq.com/document/path/90236#%E6%96%87%E6%9C%AC%E9%80%9A%E7%9F%A5%E5%9E%8B)
diff --git a/docs/zh-CN/handbook/notification-wecom/static/20241020112236.png b/docs/zh-CN/handbook/notification-wecom/static/20241020112236.png
new file mode 100644
index 000000000..b6aa71574
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/20241020112236.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config10.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config10.png
new file mode 100644
index 000000000..890124b6f
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config10.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config11.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config11.png
new file mode 100644
index 000000000..6ccb09708
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config11.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config12.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config12.png
new file mode 100644
index 000000000..2c26757ff
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config12.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config13.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config13.png
new file mode 100644
index 000000000..d6c5bacf2
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config13.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config14.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config14.png
new file mode 100644
index 000000000..178d0872a
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config14.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config6.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config6.png
new file mode 100644
index 000000000..20d2437cf
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config6.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config7.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config7.png
new file mode 100644
index 000000000..978c47486
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config7.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config8.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config8.png
new file mode 100644
index 000000000..2bd1cf030
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config8.png differ
diff --git a/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config9.png b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config9.png
new file mode 100644
index 000000000..bec61876e
Binary files /dev/null and b/docs/zh-CN/handbook/notification-wecom/static/screenshot-wecom-config9.png differ
diff --git a/docs/zh-CN/handbook/user-data-sync/dev/guide.md b/docs/zh-CN/handbook/user-data-sync/dev/guide.md
new file mode 100644
index 000000000..b2df78227
--- /dev/null
+++ b/docs/zh-CN/handbook/user-data-sync/dev/guide.md
@@ -0,0 +1,144 @@
+# 扩展同步数据源类型
+
+## 概述
+
+NocoBase 支持按需要扩展同步数据源类型。
+
+## 服务端
+
+### 数据源接口
+
+NocoBase 提供了扩展同步数据源类型的注册和管理。扩展核心逻辑处理,需要继承插件提供的 `SyncSource` 抽象类,并对相应的标准接口进行实现。
+
+```ts
+import { SyncSource, UserData } from '@nocobase/plugin-user-data-sync';
+
+class CustomSyncSource extends SyncSource {
+ async pull(): Promise {
+ return [];
+ }
+}
+```
+
+`SyncSource` 提供了options属性,用于获取数据源的自定义配置。
+
+```ts
+import { SyncSource, UserData } from '@nocobase/plugin-user-data-sync';
+
+class CustomSyncSource extends SyncSource {
+ async pull(): Promise {
+ //...
+ const { appid, secret } = this.options;
+ //...
+ return [];
+ }
+}
+```
+
+### UserData字段说明
+
+| 字段 | 说明 |
+| -------- | ---------------------- |
+| `dataType` | 数据类型, 可选值为 `user` 和 `department` |
+| `uniqueKey` | 唯一标识字段 |
+| `records` | 数据记录 |
+| `sourceName` | 数据源名称 |
+
+若dataType为 `user`,则records包含以下字段:
+
+| 字段 | 说明 |
+| -------- | ---------------------- |
+| `id` | 用户 ID |
+| `nickname` | 用户昵称 |
+| `avatar` | 用户头像 |
+| `email` | 邮箱 |
+| `phone` | 手机号 |
+| `departments` | 所属部门ID数组 |
+
+若dataType为 `department`,则records包含以下字段:
+| 字段 | 说明 |
+| -------- | ---------------------- |
+| `id` | 部门 ID |
+| `name` | 部门名称 |
+| `parentId` | 父级部门 ID |
+
+### 数据源接口实现完整示例
+
+```ts
+import { SyncSource, UserData } from '@nocobase/plugin-user-data-sync';
+
+class CustomSyncSource extends SyncSource {
+ async pull(): Promise {
+ // ...
+ const ThirdClientApi = new ThirdClientApi(this.options.appid, this.options.secret);
+ const departments = await this.clientapi.getDepartments();
+ const users = await this.clientapi.getUsers();
+ // ...
+ return [
+ {
+ dataType: 'department',
+ uniqueKey: 'id',
+ records: departments,
+ sourceName: this.instance.name,
+ },
+ {
+ dataType: 'user',
+ uniqueKey: 'id',
+ records: users,
+ sourceName: this.instance.name,
+ },
+ ];
+ }
+}
+```
+
+### 数据源类型注册
+
+扩展的数据源需要向数据管理模块注册。
+
+```ts
+import UserDataSyncPlugin from '@nocobase/plugin-user-data-sync';
+
+class CustomSourcePlugin extends Plugin {
+ async load() {
+ const syncPlugin = this.app.pm.get(UserDataSyncPlugin) as UserDataSyncPlugin;
+ if (syncPlugin) {
+ syncPlugin.sourceManager.reigsterType('custom-source-type', {
+ syncSource: CustomSyncSource,
+ title: 'Custom Source',
+ });
+ }
+ }
+}
+```
+
+## 客户端
+
+客户端用户界面通过用户数据同步插件客户端提供的接口 `registerType` 进行注册:
+
+```ts
+import SyncPlugin from '@nocobase/plugin-user-data-sync/client';
+
+class CustomSourcePlugin extends Plugin {
+ async load() {
+ const sync = this.app.pm.get(SyncPlugin);
+ sync.registerType(authType, {
+ components: {
+ AdminSettingsForm, // 后台管理表单
+ },
+ });
+ }
+}
+```
+
+### 后台管理表单
+
+![](./static/20240813135430.png)
+
+上方为通用的数据源配置,下方为可注册的自定义配置表单部分。
+
+## 第三方系统推送数据
+
+第三方系统也可通过NocoBase HTTP API向Nocobase推送数据,实现用户数据同步。
+
+详细接口文档请访问API文档页面:http://localhost:13000/admin/settings/api-doc/documentation
\ No newline at end of file
diff --git a/docs/zh-CN/handbook/user-data-sync/dev/static/20240813135430.png b/docs/zh-CN/handbook/user-data-sync/dev/static/20240813135430.png
new file mode 100644
index 000000000..0408f80e2
Binary files /dev/null and b/docs/zh-CN/handbook/user-data-sync/dev/static/20240813135430.png differ
diff --git a/docs/zh-CN/handbook/user-data-sync/index.md b/docs/zh-CN/handbook/user-data-sync/index.md
new file mode 100644
index 000000000..cb83a877d
--- /dev/null
+++ b/docs/zh-CN/handbook/user-data-sync/index.md
@@ -0,0 +1,11 @@
+# 用户数据同步
+
+
+
+## 介绍
+
+提供用户数据源管理,用户数据同步接口,数据源可为钉钉、企业微信等,并且可扩展,目前可同步`用户`和`部门`数据。
+
+## 安装
+
+内置插件,无需单独安装。
\ No newline at end of file
diff --git a/docs/zh-CN/handbook/user-data-sync/manual.md b/docs/zh-CN/handbook/user-data-sync/manual.md
new file mode 100644
index 000000000..7944ba82d
--- /dev/null
+++ b/docs/zh-CN/handbook/user-data-sync/manual.md
@@ -0,0 +1,40 @@
+# 使用手册
+
+## 数据源管理
+
+用户数据同步插件在配置中心提供了一个管理界面。
+
+![](./static/20240813134409.png)
+
+## 激活数据源
+
+只有激活的数据源才会显示同步和任务按钮。
+
+![](./static/20240813134707.png)
+
+## 同步数据
+
+点击同步按钮后即开始同步。
+
+![](./static/20240813134818.png)
+
+点击任务按钮后可以查看同步任务列表。
+
+![](./static/20240813135105.png)
+
+![](./static/20240813134110.png)
+
+任务列表中可对失败的任务进行重试,点击后重新开始同步。
+
+![](./static/20240813134933.png)
+
+## 数据源类型
+
+![](./static/20240813133944.png)
+
+目前支持的数据源类型有:
+
+- 钉钉, [dingtalk-auth 插件](../auth-dingtalk/index.md) 扩展
+- 企业微信, [wecom-auth 插件](../auth-wecom/index.md) 扩展
+
+除此之外,也可以自己扩展数据源,参考[开发指南](./dev/guide.md)。
\ No newline at end of file
diff --git a/docs/zh-CN/handbook/user-data-sync/static/20240813133944.png b/docs/zh-CN/handbook/user-data-sync/static/20240813133944.png
new file mode 100644
index 000000000..d38cd9c87
Binary files /dev/null and b/docs/zh-CN/handbook/user-data-sync/static/20240813133944.png differ
diff --git a/docs/zh-CN/handbook/user-data-sync/static/20240813134110.png b/docs/zh-CN/handbook/user-data-sync/static/20240813134110.png
new file mode 100644
index 000000000..749f816ee
Binary files /dev/null and b/docs/zh-CN/handbook/user-data-sync/static/20240813134110.png differ
diff --git a/docs/zh-CN/handbook/user-data-sync/static/20240813134409.png b/docs/zh-CN/handbook/user-data-sync/static/20240813134409.png
new file mode 100644
index 000000000..620cefba2
Binary files /dev/null and b/docs/zh-CN/handbook/user-data-sync/static/20240813134409.png differ
diff --git a/docs/zh-CN/handbook/user-data-sync/static/20240813134707.png b/docs/zh-CN/handbook/user-data-sync/static/20240813134707.png
new file mode 100644
index 000000000..06ac25e69
Binary files /dev/null and b/docs/zh-CN/handbook/user-data-sync/static/20240813134707.png differ
diff --git a/docs/zh-CN/handbook/user-data-sync/static/20240813134818.png b/docs/zh-CN/handbook/user-data-sync/static/20240813134818.png
new file mode 100644
index 000000000..62f34f6ce
Binary files /dev/null and b/docs/zh-CN/handbook/user-data-sync/static/20240813134818.png differ
diff --git a/docs/zh-CN/handbook/user-data-sync/static/20240813134933.png b/docs/zh-CN/handbook/user-data-sync/static/20240813134933.png
new file mode 100644
index 000000000..beec12132
Binary files /dev/null and b/docs/zh-CN/handbook/user-data-sync/static/20240813134933.png differ
diff --git a/docs/zh-CN/handbook/user-data-sync/static/20240813135105.png b/docs/zh-CN/handbook/user-data-sync/static/20240813135105.png
new file mode 100644
index 000000000..9418351bf
Binary files /dev/null and b/docs/zh-CN/handbook/user-data-sync/static/20240813135105.png differ