DingTalk
Deploy Mona as a DingTalk bot for enterprise messaging.
Prerequisites
- A working MonoClaw installation
- A DingTalk developer account
- An organization with admin access
1. Create a DingTalk app
- Go to open.dingtalk.com
- Click Create App → H5 Micro App
- Fill in app information
- Note the AgentId, AppKey, and AppSecret
2. Enable robot
- In your app settings, go to Robot
- Enable Robot Message Push
- Set the webhook URL:
https://your-domain.com/webhooks/dingtalk - Note the Robot Code
3. Configure MonoClaw
monoclaw gateway setup
Choose DingTalk and enter:
- App Key
- App Secret
- Robot Code
Or manually:
monoclaw config set DINGTALK_APP_KEY "your-app-key"
monoclaw config set DINGTALK_APP_SECRET "your-app-secret"
monoclaw config set DINGTALK_ROBOT_CODE "your-robot-code"
4. Start the gateway
monoclaw gateway start
Interaction
Group chats
Add the bot to a DingTalk group:
- Go to group settings → Smart Assistants
- Add your bot
- @mention the bot to interact
@Mona summarize today's meeting notes
DMs
Search for the bot in DingTalk and send messages directly.
Configuration
gateway:
dingtalk:
app_key: "${DINGTALK_APP_KEY}"
app_secret: "${DINGTALK_APP_SECRET}"
robot_code: "${DINGTALK_ROBOT_CODE}"
encrypt: true
Card messages
Mona can send rich card messages:
gateway:
dingtalk:
card_messages: true
Troubleshooting
| Problem | Fix |
|---|---|
| "Invalid app key" | Check key matches the DingTalk developer portal |
| "Webhook failed" | Ensure your server is publicly accessible |
| Bot not responding in group | Verify bot is added to the group and has permission |
| "Encryption error" | Ensure encrypt matches the portal setting |