> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Group Chat

> Learn how to create and update DingTalk group chats on the YiDA platform by building forms and configuring connectors. This guide covers the design of the create and update group chat forms, along with step-by-step instructions for using connectors in Integration & Automation to run these actions automatically.

This topic walks through building the create-group-chat and update-group-chat forms and connectors used in this example, then shows how submitting each form triggers the corresponding action.

## Result

Creating a group chat produces the following result:

Updating a group chat produces the following result:

## Step 1: Build and Configure the "Create Group Chat" Form

Create a form to capture the group name, group owner, and group members needed to create a group chat.

**Procedure:**

1. Create a regular form and name it "Create group chat".
2. Add a Single-line text component, name it "Group chat name", and mark it as required. (See Figure 2.1-1.)

Figure 2.1-1 Add and configure the Single-line text component

3. Add a member component, name it "Select group owner", and mark it as required. (See Figure 2.1-2.)

Figure 2.1-2 Add and configure the member component

4. Add another member component, name it "Select group members", mark it as required, and enable Multiselect mode. (See Figure 2.1-3.)

Figure 2.1-3 Add and configure the member component

5. Click Save in the top right corner of the page.

## Step 2: Build and Configure the "Group Chat Data Summary" Form

Create a form to record information about the group chats created through the "Create group chat" form, including the group name and group chat ID. The group chat ID comes from the data returned by the create-group-chat connector.

**Procedure:**

1. Create a regular form and name it "Group chat data summary".
2. Add two Single-line text components, and name them "Group chat name" and "Group chat ID". (See Figure 2.1-4.)

Figure 2.1-4 Add and configure the Single-line text components

3. Click Save in the top right corner.

## Step 3: Build and Configure the "Update Group Chat" Form

Create a form to capture the data needed to update a group chat that was created through the connector.

**Procedure:**

1. Create a regular form and name it "Update group chat".
2. Add a Select dropdown component, name it "Select group chat", mark it as required, and link its options to the "Group chat name" component in the "Group chat data summary" form. (See Figure 2.1-5.)

Figure 2.1-5 Add and configure the Select dropdown component

3. Add a Single-line text component and name it "Group chat ID". Configure data linkage with the "Group chat data summary" form so that when the value of "Select group chat" matches the value of "Group chat name", the value of "Group chat ID" equals the value of the "Group chat ID" component. (See Figure 2.1-6.)

Figure 2.1-6 Add a Single-line text component and configure data linkage

4. Add two member components, name them "Add group members" and "Remove group members", and enable Multiselect mode. (See Figure 2.1-7.)

Figure 2.1-7 Add and configure the member components

5. Add a Single-line text component and name it "Updated group chat name". (See Figure 2.1-8.)

Figure 2.1-8 Add and configure the Single-line text component

6. Click Save in the top right corner of the page.

## Step 4: Add and Configure a Connector for the "Create Group Chat" Form

<Note>
  For an introduction to YiDA connectors, see [Integration & Automation - Connector](/yida/integration/gqmveiswrxkgxu9s).
</Note>

The base forms required by the connector are now ready. Next, add and configure connectors for the "Create group chat" form and the "Update group chat" form to build the logic layer.

This connector automatically creates a DingTalk group chat when the "Create group chat" form is submitted.

**Procedure:**

1. Go to the admin page > "Create group chat" > "Integration & Automation" > "Create Integration & Automation". (See Figure 2.2-1.)

Figure 2.2-1 Connector configuration entry

2. Enter "Create group chat" as the connector name, set Trigger type to "Form event trigger", and click Confirm.

(See Figure 2.2-2.)

Figure 2.2-2 Create a connector

3. Configure the form trigger event: set the trigger event to "Create success", set the data filter to "All data", and click Save.

(See Figure 2.2-3.)

Figure 2.2-3 Configure the form trigger event of the connector

4. Select the connector app: set App to "Group Chat", and click Next. (See Figure 2.2-4.)

Figure 2.2-4 Select the connector app

5. Select the action: set the action to "Create group chat", and click Next. (See Figure 2.2-5.)

Figure 2.2-5 Select the connector action

6. Configure the action, and click Save. (See Figure 2.2-6.)

Figure 2.2-6 Configure the connector action

7. Click Save in the top right corner of the page, and then click Publish.
8. Add a "Create data" node below the "Connector" node and configure it. This node returns the group chat ID to the "Group chat data summary" form. (See Figure 2.2-7.)

Figure 2.2-7(1) Add a Create data node

Figure 2.2-7(2) Configure the Create data node

## Step 5: Add and Configure a Connector for the "Update Group Chat" Form

This connector automatically updates the DingTalk group chat created through the connector whenever the "Update group chat" form is submitted.

**Procedure:**

1. Go to the admin page > "Create group chat" > "Settings" > "Page settings" > "Integration & Automation" > "Create Integration & Automation". (See Figure 2.2-8.)

Figure 2.2-8 Connector configuration entry

2. Enter "Create group chat" as the connector name, set Trigger type to "Form event trigger", and click Confirm.

(See Figure 2.2-9.)

Figure 2.2-9 Create a connector

3. Configure the form trigger event: set the trigger event to "Create success", set the data filter to "All data", and click Save.

(See Figure 2.2-10.)

Figure 2.2-10 Configure the form trigger event of the connector

4. Select the connector app: set App to "Group Chat", and click Next.

(See Figure 2.2-11.)

Figure 2.2-11 Select the connector app

5. Select the action: set the action to "Create group chat", and click Next.

(See Figure 2.2-12.)

Figure 2.2-12 Select the connector action

6. Configure the action, and click Save. (See Figure 2.2-13.)

Figure 2.2-13 Configure the connector action

7. Click Save in the top right corner of the page, and then click Publish.

## Step 6: Submit the "Create Group Chat" Form to Trigger the Create-Group-Chat Connector

Figure 2.3-1 Submit the Create group chat form

## Step 7: Submit the "Update Group Chat" Form to Trigger the Update-Group-Chat Connector

Figure 2.3-2 Submit the Update group chat form

## FAQ

Q: How do I obtain the group ID of a group chat created through a connector?

A: Add a Create data node after the create-group-chat connector to persist the group chat ID returned by the connector to another form. (See the figure below.)
