What is a bot
As a standalone app capability, bots play an important role in DingTalk. With simple configuration, a bot can send message notifications or provide interactive services to users in direct messages or group chats. Bots help integrate business information and tasks into DingTalk conversations, accelerating workflows and team collaboration.Bot types
| Type | Group Chat supported | Direct Message supported | Creation method |
|---|---|---|---|
| Enterprise bot | ✅ (Internal Group) | ✅ | Configure an enterprise bot |
| Third-party enterprise app bot | ✅ (Internal Group) | ✅ | Third-party enterprise bot |
| Custom bot | ✅ (External Chat & Internal Group) | ❌ | Create a custom bot |
| Group template bot | ✅ (Internal Group) | ❌ | Create a group template bot |
Bot ID
| Bot type | Unique identifier field | View path |
|---|---|---|
| Internal app / third-party app bot | robotCode | image.png |
| Group template bot | ID | image.png |
| Custom bot | Not available | Not available |
Open capability overview
Bots provide a rich set of open APIs. Developers can use these APIs to send and receive messages through bots.List of open APIs
DING messages
| API | Description | Applicable type | API Version |
|---|---|---|---|
| Send a DING message | Use an internal bot to send a DING message, including in-app DING, SMS DING, and Phone DING. | Internal app bot | New |
| Recall a sent DING message | Internal app bot | New |
Plain messages
| API | Description | Applicable type | API Version |
|---|---|---|---|
| Send bot messages in batches in person-to-bot Chats | Send bot messages in batches in person-to-bot Chats (Direct Message between a user and a bot). | Third-party enterprise app bot | New |
| Bot sends plain messages in person-to-person Chats | A bot sends plain messages in a person-to-person Chat. | Third-party enterprise app bot | New |
| Bot sends Group Chat messages | An app bot sends Group Chat messages. | Internal app bot | New |
| Custom bot sends group messages | Use a custom bot to send group messages. | Custom bot | New |
Message reception
| API | Description | Applicable type | API Version |
|---|---|---|---|
| Download the file content of messages received by a bot | Download the file content of messages received by a bot. | Third-party enterprise app bot | New |
Message query
| API | Description | Applicable type | API Version |
|---|---|---|---|
| Batch query the Read status of bot messages in person-to-bot Chats | Batch query whether bot messages have been read in person-to-bot Chats. | Third-party enterprise app bot | New |
| Query the Read List of bot messages in person-to-person Chats | Query the Read List of bot messages in person-to-person Chats. | Third-party enterprise app bot | New |
| Query user Read status of enterprise bot Group Chat messages | Query user Read status of enterprise bot Group Chat messages. | Third-party enterprise app bot | New |
Message Recall
| API | Description | Applicable type | API Version |
|---|---|---|---|
| Batch recall bot messages in person-to-bot Chats | Batch recall bot messages in person-to-bot Chats. | Third-party enterprise app bot | New |
| Batch recall bot messages in person-to-person Chats | Batch recall bot messages in person-to-person Chats. | Third-party enterprise app bot | New |
| Enterprise bot recalls Internal Group messages | An enterprise bot recalls Internal Group messages. | Internal app bot | New |
Bot management
| API | Description | Applicable type | API Version |
|---|---|---|---|
| Get the list of Bots in a group | Get the list of Bots in a group. | Internal app bot | New |
Quick entry management
| API | Description | Applicable type | API Version |
|---|---|---|---|
| Set the quick entry of a Single-chat bot | Set the quick entry of a Single-chat bot. | Internal app bot | New |
| Query the quick entry of a Single-chat bot | Query the quick entry of a Single-chat bot. | Internal app bot | New |
| Clear the quick entry of a Single-chat bot | Clear the quick entry of a Single-chat bot. | Internal app bot | New |
List of callback events
Bots support callback events for message recall and message read:- Bot message Recall event
- Bot message Read event
Tutorials
Enterprise bot
- To create an enterprise bot, see Configure an enterprise bot.
-
DingTalk provides tutorials and sample code for sending Direct Messages and Group Chat messages with this bot. Click the links below for details.
- Send Group Chat messages: Enterprise bot sends Group Chat messages
- Send Direct Messages: Enterprise bot sends Direct Messages
Third-party enterprise bot
To create a third-party enterprise bot, see the third-party enterprise bot documentation.Custom bot
- To create a custom bot, see Create a custom bot.
- DingTalk provides tutorials and sample code for sending Group Chat messages with this bot. See Custom bot sends Group Chat messages.