Skip to main content
To send group chat messages using a group template bot, follow the steps in this document.

Define the requirements

Before development, review the following overview. This document explains how to use a group template bot to send group chat messages through the group assistant message API. To get started quickly, run the sample demo provided in the Quickstart section. This gives you a hands-on experience with the group template bot.

Prerequisites

  1. Complete the process of creating a group template bot.
  2. Complete the API permission application for the OpenAPI. Apply for the DingTalk group message management permission.
  3. Prepare the development environment:
    • Java: JDK 1.8 or later installed
    • Java: Maven 3 installed

Quickstart

  1. Download the group-template-robot-group-message-quick-start sample demo.
  2. Replace the parameters in the main method of groupTemplateRobotGroupMessage:
  3. Run the main method. You will receive the message sent by the bot in the group.

Procedure

  1. Add the dependencies to the pom.xml file of the project.
  2. Create the main method and run it.
    A group chat is automatically created, and you can see the message sent by the group template bot in the group.
  • Send group assistant messages