Platform Introduction
Develop Process
Quick Starts
Develop Web Apps
Develop Bots
Develop Gadgets (Not Recommended)
Develop Docs Add-ons
Develop Base Extensions
Develop Workplace Blocks
Message Card
SSO&End User Consent
AppLink Protocol
Configure App Entry
Tools and SDKs
FAQ
Management Practice
Platform Notices
Deprecated Guides

Bot overview

Bot overview

I. Introduction

A bot is a nifty way to run code and automate messages and tasks. Advantages of using bot:

  • Embedded experience: You can access contents, collect information or conduct other operations through messages in chat. With the help of bot, you can integrate enterprise systems into Lark and get a all-in-one system experience in Lark.
  • The development cost is relatively low: Only server-side development is required to realize a bot that send beautiful messages and can interact. And once developed, it can be easily used by other members of the company.
  • Support rich message types: You can not only send text, picture, and file messages with bot, but also send message cards with more friendly presentation styles and support interaction, so that the push content can better reach users. Complete message types supported: Send Message Content Introduction

Here are some tutorials for your reference:

II. Types of bot

Bot app

The bot needs to be created in the developer console, and it can be used once the release process has been approved by the tenant's application administrator.

Users within the scope of the app's release can directly chat with the bot you created, or add the bot to the group chat in the Group Settings > Group Bot panel.

The bot app is controlled by the application administrator. After the application administrator has reviewed the permissions, it can call Lark's rich open APIs to obtain and use user and tenant resources.

You can refer to Tutorial: Interactive bot based on conversations to learn the basic process of developing an interactive bot.

Custom bot

Custom bots can only be used in group chats. You can create custom bots according to your own needs. Custom bots use webhook to receive messages from external systems and then push the messages to your group chats. Custom bots are used to automatically send notifications and will not respond to your messages.

You could quickly create one by entering your target group and clicking Settings > BOTs > Add Bot > Select Custom Bot, which would not require the approval of your tenant's application administrator.

Since custom robots can be used without being reviewed by tenant administrators, the convenience of use also limits their scope of use:

  • Can only be used in the added group chat, no private chat with the bot
  • Only one-way message push for group chats, and Lark's rich open APIs cannot be called to obtain any user and tenant information

Refer to Custom bot guide for more information.

Which to choose

The custom bot configuration process is simple, but the usage scenarios are relatively limited, and can only meet the needs of basic group message push scenarios.

Although the application bot needs to go through the release review, it can call Lark's rich open interfaces to complete more interactive scenarios under the premise of the authorization of the tenant's application administrator.

  • If you only need to temporarily complete a relatively fixed message push in the group chat, it is recommended to use a simple custom bot;
  • If you want to integrate external systems into Lark, so that bots can interact and manage groups, it is recommended that you use bot.

The comparison of the capabilities of custom bots and bots are as follows:

III. How to use the bot you created in Lark

After the "Bot" you created has been published, users can follow the Use a Bot in Lark tutorial to learn how to use it properly:

  • Add the Bot which is visible to them to a group and allow it to interact with group members
  • Use it to push messages to users within the visibility range
The contents of this article