Integration & Automation-send messages to group sessions
Note:
- Currently, this function can only send messages to group chats created through connectors.
- For more information about how to create a DingTalk scenario group through a connector, see:https://www.yuque.com/fuqiang-lg6nm/bmno0y/sruegk
1. Usage scenarios
When a user completes a task on YIDA or finds that a target is reached through data analysis, a group message is sent to notify the group members, we can send messages to YIDA groups through the DingTalk connector.
2. Procedure
2.1 Step 1: Create a data base table
Create a form to record group chat information created through a connector, including group name and group ID.
Procedure:
- Create a common form named group information record table 」.
- Add two single-line text components namedGroup name and group ID 」. (The operation is shown in Figure 2.1-1)
Figure 2.1-1 configuration form
- Click save in the upper-right corner of the page.
2.2 Step 2: obtain group chat information
Through Step 1, we have completed the data base table, namelyNext, we will transform the connector for creating group chat to automatically enter the group chat information created in the group information record table.
Procedure:
- Edit the nameThe integration and automation process of "create group chat". Add and configure data nodes for "add data" in the process. (The operation is shown in Figure 2.2-1)
Note: This step automatically adds the group information to the group chat information entry form whenever you create a scene group through the create group chat form, provides data sources for subsequent operations.
Figure 2.2-1 add data node
- Configure the "add data" node: set the new method to "add in form" and select the form as "group information record table 」; set the new data to" add a single piece of data "; Finally, set the field. (The operation is shown in Figure 2.2-2)
Figure 2.2-2 configure the add data node
- Click the Save button in the upper-right corner of the page, and then click Publish.
- Use the create group chat form to submit data for backup. (The operation is shown in Figure 2.2-3)
Figure 2.2-3 submit the create group chat form data
2.3 Step 3: Create a Send group message form
Create a form named group message content entry table to enter message content.
Procedure:
- Create a new form named group message content entry table 」.
- Add a multi-line text component named message content and set it to required. (The operation is shown in Figure 2.3-1)
Figure 2.3-1 add and configure multiple lines of text
- Add a drop-down radio component named "select group chat", set the option type to "associate other form data", and select "group information record table-group name" as the form data 」. (The operation is shown in Figure 2.3-2)
Figure 2.3-2 add and configure the drop-down radio component
- Add a single-line text component named "group ID", set the component status to "read-only", and set the default value to "data linkage" to associate the "Group Information record table 」, when the value of the group name selection component is equal to the group name in the group information record form, the value of the group ID component of the group message content entry table is equal to the group ID value of the group information record table. (The operation is shown in Figure 2.3-3)
Figure 2.3-3 add and configure a single-line text component
- Click save in the upper-right corner.
2.4 Step 4: create Integration & Automation
Further reading:For more information about obtaining the YIDA connector, go:Integration & Automation
The system automatically initiates group chat requirements when submitting forms. We need to configure a connector for the group message content entry form.
2.4.1 New Integration & Automation
Procedure:
- Background management page> Integration & automation> create Integration & Automation 」. (The operation is shown in Figure 2.4-1)
Figure 2.4-1 connector entry
- The configuration Integration & automation name is "send group message"> trigger type is "form event trigger" and the trigger form is "group message content entry table"> confirm. (The operation is shown in Figure 2.4-2)
Figure 2.4-2 New connector
2.4.2 configuration Integration & Automation
Procedure:
- Click the "form event trigger" node, select "created" on the right side of the trigger event, select "all data" for data filtering, and then click save. (The operation is shown in Figure 2.4-3)
Figure 2.4-3 configurationForm event trigger node
- Click the "connector" node, select "message" DingTalk official application on the right, and click next. (The operation is shown in Figure 2.4-4)
Figure 2.4-4 configurationConnector node-select application
- Select send message to Enterprise Group and click next. (The operation is shown in Figure 2.4-5)
Figure 2.4-5 configurationConnector node-select execute action
- After configuring the execution action, click save. (The operation is shown in Figure 2.4-6)
Figure 2.4-6 configurationConnector node-configure execution actions
- Click save in the upper-right corner of the page and click Publish.
2.5 Step 5: fill in and submit the group message content
Through the above steps, we have completed the configuration and data preparation of the implementation function. Next, we only need to submit a form to trigger the connector to send a message to the specified group chat.
Procedure:
Fill in the form and click submit. (The operation is shown in Figure 2.5-1)
Figure 2.5-1 enter form information and submit
3. Achieve results
Figure 3-1 shows the effect of sending messages to the scene group through the connector