Webhook

2026-01-05 18:35:21
Sanplex Content
37
Last edited by WANG JING on 2026-01-05 18:57:08
Share links
Summary : Configure Sanplex webhooks to push JSON notifications to third-party endpoints, with flexible triggers, scope filters, and optional scheduled delivery for asynchronous sending.

Sanplex provides webhook integration. It can send JSON payloads to third-party webhook endpoints for message delivery and integration, including DingTalk, WeCom, and Lark. This section explains how to configure the feature.

图1

1. Configure a Webhook

Go to Admin > Notification Settings > Webhook.

Sanplex provides multiple webhook types. Fill in different fields based on the selected type.

图2

Notes:

  • Name: Required.

  • Webhook URL: Required. Obtain it from the third-party system.

  • Delivery Mode:

    • Synchronous: Messages are sent immediately after an action occurs in Sanplex.
    • Asynchronous: Requires configuring a scheduled sending job in Admin > System Settings > Scheduled Tasks.
  • Associated Product:

    • Blank: Send messages for all actions across Sanplex.
    • Specified: Send only actions related to the selected product.
  • Associated Execution:

    • Blank: Send messages for all actions across Sanplex.
    • Specified: Send only actions related to the selected execution.
  • Trigger Actions: Actions that trigger a webhook message. Configure them in Admin > Notification Settings > Settings. If you are familiar with secondary development, you can extend module/webhook/config.php to adjust this list.

  • Payload fields: The attributes included in the outgoing JSON, for example:

{
  "objectType": "",  // Object type (optional)
  "objectID": "",    // Object ID (optional)
  "product": "",     // Associated product ID (optional)
  "project": "",     // Associated execution ID (optional)
  "action": "",      // Action (optional)
  "actor": "",       // Operator (optional)
  "date": "",        // Action time (optional)
  "comment": "",     // Comment (optional)
  "text": ""         // Action content, including the object URL (required)
} 

2. Configure a DingTalk Group Notification Bot

2.1 Create a DingTalk Bot

In DingTalk, open Group Settings > Smart Group Assistant > Add Bot.

图3

Select Custom and connect a custom service via webhook.

图4

Click Add.

图5

Under Security Settings, enable Signature.

图6

Sanplex currently supports signature-based verification for DingTalk group bots. When adding a DingTalk group bot webhook in Admin > Notification Settings > Webhook, copy the Secret from DingTalk and paste it into the Secret field in Sanplex.

Click Done to obtain the Webhook URL.

图7

2.2 Configure the bot Webhook in Sanplex

Add a webhook of type DingTalk Group Notification Bot in Sanplex, and enter the Secret and Webhook URL obtained from DingTalk. Sanplex will then be able to send messages to DingTalk.

图8

Notes:

  • DingTalk group bot delivery is synchronous by default and cannot be changed.
  • DingTalk may rate-limit custom bot messages (e.g., up to 20 messages per minute).

3. Configure DingTalk Work Message Notifications

3.1 Create a DingTalk application

Register on the DingTalk Open Platform, then go to App Development > In-house Development > Mini Program > Create App.

图9

Enter the app name and description, then click Confirm. On the Basic Information page, obtain the app ID, Key, and Secret.

图10

Go to Development Management and enter the server outbound IP (the public IP of the server where Sanplex is deployed). This IP must be new/unclaimed in the DingTalk Open Platform. One app corresponds to one outbound IP.

图11

3.2 Configure the webhook in Sanplex

Select DingTalk Work Message Notification as the webhook type, then fill in AgentId, AppKey, and AppSecret.

图12

3.3 Sync and bind users

After creating a DingTalk work-message app, you must sync and bind users.

Go to Permission Management > Notification API Data to request the permissions required to access the corporate address book.

图13

The default permission scope is All employees. If you only need some employees, click Add next to Authorized Departments to select departments.

图14

Go to Address Book Management and maintain department and member information.

图15

Note: The developer account used to create the DingTalk app must have address book management permissions.

图16

Then, in Sanplex, click Bind Users to sync and associate users.

图17

On the Bind Users page:

  • Already-bound users will not appear in the DingTalk UserId list.
  • You can unbind users.
  • You can modify existing bindings.

图18

After binding, users can receive relevant Sanplex notifications in DingTalk based on Admin > Notification Settings > Settings.

图19

4. Configure a WeCom Group Bot

4.1 Add a WeCom bot

In a mobile group chat, tap the team icon in the top-right.

图20

Tap Group Bot.

图21

Enter the bot name and tap Add.

图22

After the bot is created, a Webhook URL is generated. Send this URL to the Sanplex system administrator for configuration.

图23

4.2 Configure the bot in Sanplex

Add a webhook of type WeCom Group Bot in Sanplex and paste the bot’s Webhook URL.

图24

Note: Webhook trigger actions must be selected in Admin > Notification Settings > Settings.

图25

5. Configure WeCom App Messages

5.1 Create a WeCom application

Create a WeCom account, then go to App Management > Create App.

图26

Enter the app name and select the Visibility scope.

图27

“Visibility” refers to the departments and members in the enterprise. In Sanplex, you can bind users within the visibility scope to receive message notifications. You may select departments or specific users. Selecting a department includes all users in that department; parent departments include users in sub-departments.

图28

After creation, obtain the app Secret, which is required when adding the webhook in Sanplex.

5.2 Configure the webhook in Sanplex

On the Add Webhook page in Sanplex, select WeCom App Message, then enter:

  • Corp ID (available to WeCom admins under “My Enterprise”)
  • Secret
  • AgentId

图29

Click Save. The webhook will appear in the webhook list.

5.3 Bind users

After adding the webhook, bind Sanplex users to WeCom users. Once bound, relevant Sanplex actions will be delivered as app messages.

图30

Click Bind Users in the action column to open the binding page. Select the user(s) to bind and click Action. In the dialog, choose the corresponding WeCom user from the dropdown and click Save.

图31

You can then see the WeCom user bindings in the list.

图32

Bound users will receive Sanplex notifications in WeCom.

图33

6. Configure Lark Work Message Notifications

6.1 Create an application

Create an app on the Lark Open Platform.

图34

After clicking Confirm, configure the app.

图35

6.2 Enable the bot

Open the app settings, go to Bot, and click Enable Bot.

图36

6.3 Configure permissions

Under Permission Management, enable permissions for Users, Messages, and Directory/Contacts.

图37

6.4 Version management and release

In Version Management & Release, create an app version and set Availability to All members.

图38

Click Confirm. The app will show Pending approval status. Click Request release.

图39

6.5 Approve the version

An admin will receive an approval notification in Lark.

图40

Click Review and Approve.

图41

6.6 Add the webhook in Sanplex

Obtain the App ID and App Secret from Credentials & Basic Information.

图42

Fill them into the corresponding fields in Sanplex.

图43

After saving, perform User Binding.

图44

Once configured, you can receive Sanplex notifications in Lark.

7. Configure a Lark Group Notification Bot

You can also configure a group notification bot in Lark. Select a group chat and click Settings on the right.

图45

Click Group Bot, then add a Custom Bot.

图46

Enter the required information.

图47

Copy the bot’s Webhook URL and Signature Verification.

图48

Click Done. In Sanplex, configure this bot by filling in the copied Webhook URL and Signature Verification in the corresponding fields.

图49

The Lark group notification bot is now ready.

图50

Write a Comment
Comment will be posted after it is reviewed.