Skip to main content
Note:
  • This feature can only send messages to group chats created through connectors.
  • To create a DingTalk scenario group through a connector, see: Auto-create groups with YiDA Connectors

Use Case

When a user completes a task in YiDA, or reaches a specific metric identified through data analysis, and needs to notify group members, use a YiDA connector to send a message to a DingTalk group chat.

Procedure

Step 1: Create the Base Table

Create a form to record information about group chats created through the connector, including the group name and group ID. Procedure:
  1. Create a regular form and name it “Group Info Record Table”.
  2. Add two Single-line text components and name them “Group name” and “Group ID”. (See Figure 2.1-1.)
Figure 2.1-1 Group info record form design
  1. Click Save in the upper-right corner of the page.

Step 2: Retrieve Group Chat Information

With the base table “Group Info Record Table” ready, modify the connector that creates group chats so that the group chat information is automatically written into the “Group Info Record Table”. Procedure:
  1. Edit the Integration & Automation flow named “New Chat”, add an “Add data” node to the flow, and configure it. (See Figure 2.2-1.)
Note: This step ensures that whenever a scenario group is created through the “New Chat” form, the group information is automatically added to the “Group Chat Info Entry” form, providing a data source for subsequent operations.
Figure 2.2-1 Add the “Add data” node
  1. Configure the “Add data” node: set the add method to “Add in form”, select “Group Info Record Table” as the form, set the add data option to “Add a single record”, and then configure the fields.
(See Figure 2.2-2.) Figure 2.2-2 Configure the “Add data” node
  1. Click Save in the upper-right corner, then click Publish.
  2. Submit data through the “New Chat” form for later use. (See Figure 2.2-3.)
Figure 2.2-3 Submit data through the “New Chat” form

Step 3: Create the Form to Send Group Messages

Create a form named “Group Message Content Entry Table” to capture message content. Procedure:
  1. Create a form and name it “Group Message Content Entry Table”.
  2. Add a Multi-line text component, name it “Message content”, and set it as Required. (See Figure 2.3-1.)
Figure 2.3-1 Add and configure the Multi-line text component
  1. Add a Dropdown Select component, name it “Select group chat”, set the option type to “Associate with data from another form”, and select “Group Info Record Table - Group name” as the form data. (See Figure 2.3-2.)
Figure 2.3-2 Add and configure the Dropdown Select component
  1. Add a Single-line text component, name it “Group ID”, set its status to Read-only, and configure the Default to “data linkage” to associate it with the “Group Info Record Table”. This ensures that when the value of the “Select group chat” component matches a “Group name” entry in the “Group Info Record Table”, the “Group ID” field in the “Group Message Content Entry Table” is populated with the corresponding “Group ID” value from the “Group Info Record Table”. (See Figure 2.3-3.)
Figure 2.3-3 Add and configure the Single-line text component
  1. Click Save in the upper-right corner.

Step 4: Create the Integration & Automation Flow

For an introduction to connectors, see: Integration & Automation - Connector
To automatically send a group message when the form is submitted, configure a connector for the “Group Message Content Entry” form. Procedure:
  1. In the admin console, click Integration & Automation at the top of the page, then click Create from blank under Create Integration & Automation. (See Figure 2.4-1.)
Figure 2.4-1 Connector entry point
  1. Set the Integration & Automation name to “Send group message”, set the Trigger type to “Form event trigger”, and click Confirm. (See Figure 2.4-2.)
Figure 2.4-2 Create a Connector

Step 5: Configure the Integration & Automation Flow

Procedure:
  1. Click the “Form event trigger” node. On the right, select “Create success” as the trigger event and “All data” for the data filter, then click Save. (See Figure 2.4-3.)
Figure 2.4-3 Configure the “Form event trigger” node
  1. Click the “Connector” node. On the right, select the “Chats” DingTalk official app, then click Next. (See Figure 2.4-4.)
Figure 2.4-4 Configure the “Connector” node — select the app
  1. Select “Send message to organization group” as the action, then click Next. (See Figure 2.4-5.)
Figure 2.4-5 Configure the “Connector” node — select the action
  1. Configure the action, then click Save. (See Figure 2.4-6.)
Figure 2.4-6 Configure the “Connector” node — configure the action
  1. Click Save in the upper-right corner, then click Publish.

Step 6: Fill in and Submit the Group Message Content

Configuration and data preparation are now complete. Submit the form to trigger the connector and send a message to the specified group chat. Procedure: Fill in the form and click Submit. (See Figure 2.5-1.) Figure 2.5-1 Fill in and submit the form

Result

Figure 3-1 Sending messages to a scenario group through the connector