Integration & Automation-create and update session groups
1. Usage scenarios
This example describes how to use YIDA to submit form data within YIDA, quickly create DingTalk conversation groups, and update DingTalk conversation groups.
2. Implement functions
2.1. Create a conversation Group
2.1.1. Create a form
Manage or not, as shown in the following figure:
仅群主可管理 | 1
所有人可管理 | 0
Configure the hidden field DingTalk group session ID to store the session ID returned after DingTalk session group is created.
2.1.2. Configuration Integration & Automation
[Create session group] submit data-> call the connector "create session group 」:
"Get a single piece of data" node, get the current submitted data-> use the "update data" node to store the successful parameters returned by the session group connector back to the page:
2.2. Update session group
2.2.1. Create a form
The select group chat field is associated with the create conversation group form and data filtering criteria are added, as shown in the following figure:
Set the fill conditions for the select group chat field:
Set the associated options for the select action field:
2.2.2. Configuration Integration & Automation
[Update session group] submit data/edit data-> use the connector "modify group session" to update group information
Obtain the group chat data in the create conversation group form and update the latest conversation group information back to the create conversation group form.
Add group members:
The formula for the group member field is as follows:
{"text":"UNIONSET(获取历史群聊数据.群成员,添加群成员姓名)","marks":[{"from":{"line":0,"ch":9,"sticky":null},"to":{"line":0,"ch":23,"sticky":null},"value":"node_oclx2n15ij2//employeeField_lx2kwcd4","invalid":false},{"from":{"line":0,"ch":24,"sticky":null},"to":{"line":0,"ch":33,"sticky":null},"value":"employeeField_lx2me0ba","invalid":false}],"isCmData":true}
Delete a group member:
{"text":"DIFFERENCESET(获取历史群聊数据.群成员,删除群成员姓名)","marks":[{"from":{"line":0,"ch":14,"sticky":null},"to":{"line":0,"ch":28,"sticky":null},"value":"node_oclx2n15ij2//employeeField_lx2kwcd4","invalid":false},{"from":{"line":0,"ch":29,"sticky":null},"to":{"line":0,"ch":38,"sticky":null},"value":"employeeField_lx2me0b9","invalid":false}],"isCmData":true}
3. Effect
3.1. Create a conversation Group
YIDA submit data:
DingTalk session group creation:
3.2. Update session group
YIDA submit and update group chat data:
DingTalk session group update: