-
Notifications
You must be signed in to change notification settings - Fork 3.4k
DingTalk Bot Setup Guide
This guide covers how to create and configure a DingTalk bot to connect with AionUi, enabling AI assistant interactions through DingTalk.
AionUi supports DingTalk bot integration, allowing you to chat with your AI assistant directly through DingTalk. This guide will walk you through:
- Creating a bot application on DingTalk Open Platform
- Configuring credentials in AionUi
- Authorizing users and starting conversations
- A DingTalk account with developer access
- AionUi application installed
- Basic understanding of bot applications
-
Visit DingTalk Open Platform
- Go to DingTalk Open Platform
- Log in with your DingTalk account
-
Create Application
- After logging in, navigate to Application Development (应用开发) → Enterprise Internal Development (企业内部开发)
- Click "Create Application" (创建应用)
- Select Robot (机器人) as the application type

-
Get Your Credentials
- In the application details page, find the Development Information (开发信息) or Credentials (凭证) section
- Copy your AppKey (this is your Client ID)
- Copy your AppSecret (this is your Client Secret)
⚠️ Important: Keep these credentials secure and never share them publicly
-
Configure Message Reception Mode
- In the application configuration, find "Message Reception Mode" (消息接收模式) or "Connection Mode" (连接方式)
- Select Stream Mode (流式连接)
- This enables real-time message streaming and supports AI Card streaming responses

-
Publish DingTalk Bot
- After completing the configuration, click the Publish (发布) button to publish the bot

⚠️ Note: Non-admin users need admin approval to enable permissions
In the application details page, go to "Permission Management" (权限管理) or "API Permissions" (接口权限) section, and enable the following permissions one by one:
- Card.Streaming.Write - AI Card streaming write permission
- Card.Instance.Write - AI Card instance write permission
- qyapi_robot_sendmsg - Robot send message permission
These permissions are required for the bot to function properly.

-
Configure Visibility Scope
- In the application details page, find "Visibility Scope" (可见范围) or "Usage Scope" (使用范围) settings
- Set visibility to "Only Me" (仅自己) for testing, or select users/departments who need access
-
Enable Robot
- Ensure the robot feature is enabled
- Check basic information like robot name and avatar
-
Publish Application
- Click the Publish (发布) button
- Confirm the publishing information is correct
- Wait for the publishing to complete

💡 Tip: After publishing, the bot can be searched and used by users. For testing purposes, you can set it to "Only Me" first.
-
Open AionUi Settings
- Launch AionUi application
- Go to Settings (设置)
- Navigate to WebUI (Channel) section
- Find the "DingTalk" channel card
- Expand the DingTalk configuration

-
Enter Credentials
- In the DingTalk configuration form:
- Client ID: Paste the AppKey you obtained in Step 1
- Client Secret: Paste the AppSecret you obtained in Step 1
- Click "Test & Connect" to verify the connection

- In the DingTalk configuration form:
-
Configure Agent and Model
- Select the Agent you want to use for DingTalk conversations
- Choose the Model for the selected agent
- These settings determine which AI assistant will respond to DingTalk messages

After successfully connecting, you need to authorize users who can interact with the bot:
-
Find Your Bot in DingTalk
- Open DingTalk application
- Search for your bot by name
- Start a conversation with the bot
-
Send a Test Message
- Send any message to the bot (e.g., "Hello")
- This will trigger a pairing request

-
Approve the Pairing Request
- In AionUi, go back to Settings → Channels → DingTalk
- You should see a "Pending Pairings" section
- Click "Approve" to authorize the user
- The user will now be able to chat with the AI assistant through DingTalk

-
Start Chatting
- Once approved, users can send messages to the bot
- The AI assistant will respond in real-time using DingTalk's AI Card streaming feature

Problem: Cannot connect to DingTalk API
-
Solution:
- Verify your Client ID and Client Secret are correct
- Check your internet connection
- Ensure the bot application is properly configured on DingTalk Open Platform
Problem: Users cannot send messages to the bot
-
Solution:
- Make sure the user has been approved in AionUi settings
- Verify the bot is enabled in AionUi
- Check that the bot application is published/activated on DingTalk Open Platform
Problem: Bot doesn't respond to messages
-
Solution:
- Check the connection status in AionUi settings
- Verify the agent and model are properly configured
- Ensure the bot has the necessary permissions on DingTalk Open Platform (especially the three permissions mentioned in Step 2)
- Confirm the bot application has been successfully published (Step 3)
Welcome to the comprehensive AionUi documentation! Find everything you need to configure, use, and master AionUi.
- ⚙️ LLM Configuration
- 🤖 Multi-Agent Mode Setup
- 🎨 Image Generation Setup
- 🧩 Assistant Configuration
- 🔌 MCP Configuration
- 💻 WebUI Configuration
- 🌐 Remote Internet Access
- 🤖 DingTalk Bot Setup
- 💬 Slack Bot Setup
- 🎮 Discord Bot Setup
- ⏰ Scheduled Tasks Guide
- 🛠️ AI Assistants & Skills Ecosystem
- 📄 Preview Panel Guide
- 📁 File Management
- 📊 Excel Smart Processing
- 🔍 Smart Information Gathering
- 📚 Local Knowledge Base Application
- ❓ AI Learning Assistant
- ✍️ Writing & Content Creation
- 🚀 Getting Started
- ⚙️ LLM Configuration
- 🤖 Multi-Agent Mode Setup
- 🧩 Assistant Configuration
- 🎨 Image Generation
- 🔌 MCP Configuration
- 🌐 WebUI Configuration
- ⏰ Scheduled Tasks
- 🛠️ AI Assistants & Skills
- 📄 Preview Panel
- ❓ FAQ