You can add bots to a group in order to synchronize information within the team. Bots can be used in both desktop clients and mobile clients. However, you can only add and configure bots from the desktop client.
I. Function Overview
Bots are a type of automated program that can push information to users and engage in simple interactions. In a group chat, you can use two types of bots:
- •Chat bots: Chat bots refer to any bot that can interact with you. Different chat bots have different features and perform different actions according to how they were developed. Most chat bots are used in private chats, but they can also be used in group chats. For example, you can use Reminder bots to send reminders to team members.
- •Custom bots: Custom bots are created by the users and can only be used in group chats. Custom bots use webhook to receive messages from external systems and then push the messages to your group chat. Custom bots will not respond to your messages.
Note: You can add up to 15 bots to a single group.
II. Procedure
- 1. Using Chat Bots in a Group
Enter the group chat and click the Settings icon. Go to the Bots tab and click Add Bot. Click the Chat Bot tab and select the bot to add to the group chat.
After the bot is added to the group chat, group members can use its features in the group chat. Some chat bots must be configured after being added to the group chat. For others, you simply need to @ the bot to input commands. For specific instructions, go to Help Center - Using Lark - Bots to find instructions for each type of bot.
- 2. Using Custom Bots in a Group
To have a custom bot immediately push messages from an external system to the group chat, you need to use a webhook to connect the group chat and your external system. Below, we will create and configure a Custom Bot to show the general method for connecting to an external system.
Enter the relevant group and click the Settings icon. Go to the Bots tab and click Add Bot. Select Notice Bot and click Custom Bot.
Enter a suitable name for your bot and click Add. You will then receive the webhook address for this group in the following format:
https://open.larksuite.com/open-apis/bot/hook/xxxxxxxxxxxxxxxxxxxxxxxxxxx
You can send HTTP POST requests to this webhook by any means in order to send messages to the group. The request message format must be as follows (JSON format):
{
"title": "Hello Lark", # Optional
"text": "Good Lark" # Required
}
Note: Currently, notice bots only support plaint text messages. You can specify the message title and text in your request.
Request example:
curl -X POST -H "Content-Type: application/json" -d '{"title": "Hello Lark", "text": "Good Lark"}' https://open.larksuite.com/open-apis/bot/hook/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Message Style
After completing the above configuration, you and other group members can receive messages pushed to the group chat.
Go to Group Settings - Bots and click on an existing bot. Then, click Remove Bot in the lower-left corner.
III. FAQs
Q: After adding a chat bot in a group, how do I use it?
A:
The assistance that a chat bot can provide you depends on how the developer designed it. If you don’t know how to use a chat bot, you can get help in two ways:
- •You can @ the bot in a conversation. The bot will respond to you with information about how to use it.
- •If this method doesn’t work, you can click the bot’s picture to open up the bot card. There, you can find the developer’s contact information and contact the developer for assistance. You will need mobile client version 2.8 or higher, or desktop client version 2.9 or higher to see the card. If you cannot contact the developer, you can contact your admin for help.