| name | add-dingtalk |
| description | Add DingTalk Channel to NanoClaw. Enables DingTalk Stream mode messaging. Requires creating an internal app in DingTalk Developer Console (https://open-dev.dingtalk.com/feish/portal/cn/#/embed-flow-app)) |
Setup Steps
- Check if DingTalk credentials exist set in
.env file:
DINGTALK_CLIENT_ID=your_appkey
DINGTALK_CLIENT_SECRET=your_secret
- Add to
.env file (create if missing):
echo "DINGTALK_CLIENT_ID=your_appkey"
echo "DINGTALK_CLIENT_SECRET=your_secret"
echo "DINGTALK_AUTO_REGISTER=true"
echo "ENABLE_WHATSAPP=false"
- Re-run container build (if needed)
./container/build.sh
- Restart service
- macOS:
launchctl kickstart -k gui/$(id -u)/com.nanoclaw (macOS)
- Linux:
systemctl --user restart nanoclaw (Linux) or bash start-nanoclaw.sh (WSL nohup)
- Test: send a test message in DingTalk
- Verify logs:
tail -f logs/nanoclaw.log
Troubleshooting
No response to DingTalk messages:
- Check trigger pattern in main channel (no prefix needed)
- Check logs:
tail -f logs/nanoclaw.log
3. For group messages, ensure bot is @mentioned
4. Check DB: npx tsx setup/index.ts --step verify
DDingTalk disconnected:
- Check logs for connection errors
2 2. Restart service
- macOS:
launchctl kickstart -k gui/$(id -u)/com.nanoclaw (macOS)
- Linux:
systemctl --user restart nanoclaw (Linux)
DDingTalk API errors (401/403):
- 401/403: Invalid credentials, re-run step 1
2 422: Rate limiting: Messages are auto-queued
SessionWebhook missing:
- First message needs to establish session (2. Ensure recipient has responded to a message first
3 3. Then check logs for
sessionWebhook storage
4. Verify the webhook URL is valid
5. Check /registerGroup callback is available
DDingTalk sessionWebhook expiration:
- Sessions expire after some time
- Verify logs for webhook expirations
- Check credentials in
.env
4 4. Restart service if expired webhook