|
| 1 | +# DingTalk |
| 2 | + |
| 3 | +All you need is a Client ID and Client Secret to connect your DingTalk bot to nexu. |
| 4 | + |
| 5 | +## Step 1: Open the DingTalk channel in nexu |
| 6 | + |
| 7 | +1. Open the nexu client and click **DingTalk** in the Channels section. |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +2. Open the DingTalk developer platform: https://open.dingtalk.com/ |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +## Step 2: Sign in to the DingTalk developer platform |
| 16 | + |
| 17 | +1. Use the DingTalk app to scan the login QR code. |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +## Step 3: Create a DingTalk app |
| 22 | + |
| 23 | +1. After signing in, go to the app development guide page and click "Create App". |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +2. On the app development page, click "Create App" in the upper-right corner. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +3. Fill in the app name, description, and icon, then click "Save". |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +## Step 4: Add bot capability to the app |
| 36 | + |
| 37 | +1. Open the app details page, go to "Add App Capability", and click "Add" on the Bot card. |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +2. Open the "Bot" page on the left and turn on bot configuration. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +3. Complete the bot name, profile, avatar, language settings, and receive mode, then click "Publish" at the bottom. |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +## Step 5: Grant the required permissions |
| 50 | + |
| 51 | +Open "Permission Management" on the left and apply for the permissions nexu needs. |
| 52 | + |
| 53 | +For a smoother AI chat experience, we recommend enabling these AI Card permissions: |
| 54 | + |
| 55 | +- **Card.Instance.Write** - AI Card write permission |
| 56 | +- **Card.Streaming.Write** - AI Card streaming output permission |
| 57 | + |
| 58 | +Tips: |
| 59 | + |
| 60 | +- With AI Card enabled, replies appear progressively like ChatGPT |
| 61 | +- Without it, the bot still works, but replies are sent as normal text messages |
| 62 | + |
| 63 | +The screenshot below shows the page for enabling `Card.Instance.Write`. |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +## Step 6: Copy the Client ID and Client Secret |
| 68 | + |
| 69 | +Go back to the credentials page and copy these two values: |
| 70 | + |
| 71 | +- **Client ID** |
| 72 | +- **Client Secret** |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +## Step 7: Create and publish a version |
| 77 | + |
| 78 | +1. Open "Version Management & Release" on the left, then click "Create New Version" in the empty version list. |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +2. Fill in the version number, release notes, and visibility scope, then save. |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +3. Complete the DingTalk publishing flow so the bot can go live. |
| 87 | + |
| 88 | +## Step 8: Connect DingTalk in nexu |
| 89 | + |
| 90 | +1. Paste the Client ID and Client Secret into the DingTalk channel dialog in nexu, then click "Connect DingTalk". |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +2. Once connected, open DingTalk and start chatting with the bot. |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +--- |
| 99 | + |
| 100 | +## FAQ |
| 101 | + |
| 102 | +**Q: Why isn't it enough to only create the app?** |
| 103 | + |
| 104 | +A DingTalk bot usually also needs bot capability enabled, permissions granted, and a published version. Missing any of these can stop the bot from working. |
| 105 | + |
| 106 | +**Q: Do I need a public server?** |
| 107 | + |
| 108 | +No. With nexu's current DingTalk integration, you usually do not need to host your own public callback service. |
| 109 | + |
| 110 | +**Q: Why can't my teammates see the app after publishing?** |
| 111 | + |
| 112 | +Check the visibility scope you configured during version publishing and make sure the correct users or departments are included. |
| 113 | + |
| 114 | +**Q: Why is the bot not replying?** |
| 115 | + |
| 116 | +Check the Client ID and Client Secret first, then confirm the bot capability is enabled, permissions are granted, the version is published, and the nexu client is still running. |
0 commit comments