> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langbot.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy DingTalk Bot

Deploy LangBot to DingTalk.

## One-Click Setup (Recommended)

LangBot supports one-click DingTalk app creation with automatic credential filling — no manual copy-paste needed.

1. Open LangBot WebUI, go to **Bots > Create Bot**
2. Enter a bot name, select `DingTalk` as the platform/adapter
3. In the **One-Click Create App** section that appears, click the **Start** button

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/dingtalk/dingtalk_oneclick_qrcode.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=593c26b4b0ad8d6aa059510f926112f3" alt="One-Click Create App" width="1847" height="911" data-path="images/zh/deploy/bots/dingtalk/dingtalk_oneclick_qrcode.png" />

4. Scan the QR code with the DingTalk app. On your phone, select the organization to create the bot in

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/dingtalk/dingtalk_select_org.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=740a76f349d72090e9a5f37fa9071fbb" alt="Select Organization" width="1336" height="909" data-path="images/zh/deploy/bots/dingtalk/dingtalk_select_org.png" />

5. Choose to **create a new bot** or **select an existing one**

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/dingtalk/dingtalk_create_or_select.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=b6c5105132ccdf9b8dd8afea1ed8c212" alt="Create or Select Bot" width="1506" height="926" data-path="images/zh/deploy/bots/dingtalk/dingtalk_create_or_select.png" />

6. After authorization, the phone will show "Configuration Successful", and Client ID / Client Secret will be **auto-filled** in the LangBot WebUI

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/dingtalk/dingtalk_config_success.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=ee7662bff8388cf1c71df04e972b97b0" alt="Config Success" width="1507" height="891" data-path="images/zh/deploy/bots/dingtalk/dingtalk_config_success.png" />

7. **Manually fill in the bot name** (must match the DingTalk bot name), and the **Robot Code** (required for image/file features — get it from DingTalk Developer Console > Bot Configuration)

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/dingtalk/dingtalk_fill_name_and_code.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=f6cd5ba95867ffdba7ff124c5d239cce" alt="Fill Name and Code" width="1788" height="894" data-path="images/zh/deploy/bots/dingtalk/dingtalk_fill_name_and_code.png" />

8. Click **Submit** to complete

<Warning>
  After one-click setup, normal text chat works immediately. However:

  * **Image/File support**: Requires the Robot Code (RobotCode) to be filled in. If not filled during one-click setup, get it from DingTalk Developer Console > Bot Configuration
  * **Streaming replies**: Requires manually configuring a card template ID — see the Card Template section below
</Warning>

***

## Manual Configuration

### Create Bot

Enter the [DingTalk Developer Backend](https://open-dev.dingtalk.com/?spm=ding_open_doc.document.0.0.74f445e5MkawbT#/), log in and enter the organization. After successful login, enter the open platform, which looks like this:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk1.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=501dd851f0ca1bb32ea86e7a01470b11" alt="DingTalk Open Platform" width="2814" height="1425" data-path="images/zh/deploy/bots/dingtalk/dingtalk1.png" />

Click `Application Development` at the top, then click the blue button `Create Application` on the right, fill in the basic information of the bot, and click save.

Enter the bot's backend, for example, if we have a bot named langbot2, its management page looks like this:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk2.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=791fbd24da5867129644fd6e20d2fd92" alt="Bot Page" width="2858" height="1301" data-path="images/zh/deploy/bots/dingtalk/dingtalk2.png" />

### Configure Bot

Click `Add Application Capability`, `Other Application Capabilities`, `Configure` in `Robot`, click configure and fill in the information, as shown below:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk3.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=93e928b4b71a9e032183aee31b867c14" alt="Bot Configuration" width="2857" height="1435" data-path="images/zh/deploy/bots/dingtalk/dingtalk3.png" />

Click `Publish` at the bottom of the page, after successful publication, click `Version Management and Publishing` at the bottom left of the bot page, as shown:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk4.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=78a8183ddfed230ea51b6c5245672862" alt="Version Management and Publishing" width="2857" height="1385" data-path="images/zh/deploy/bots/dingtalk/dingtalk4.png" />

If this is the first time creating a bot, the right side is empty, you need to click `Create New Version`, set information in it, then set `Application Visibility Range`, and click save.

Click `Event Subscription`, change the push method to `Stream Mode Push`.

If card streaming is needed, you must apply for card permissions in the permission management, as shown:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk6.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=9ba73502c460fac0b2675611c7e91c87" alt="Before applying for card permissions" width="1920" height="892" data-path="images/zh/deploy/bots/dingtalk/dingtalk6.png" />

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk7.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=926b1877774991ae3b4ab1485b83001a" alt="After applying for card permissions" width="1910" height="970" data-path="images/zh/deploy/bots/dingtalk/dingtalk7.png" />

Additionally, for card messages you mainly need to create a card template and record the template ID to fill in the configuration, the process is as follows:

> The card content template ID can be obtained by logging into the developer backend > [Card Platform](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV)

Fill in information when creating a new template, as shown:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk8.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=489d7964196a75aa859922c03e3e62ba" alt="Fill in information for new template" width="1876" height="854" data-path="images/zh/deploy/bots/dingtalk/dingtalk8.png" />

Select a preset template (just choose the first one and modify the template content later), as shown:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk9.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=2659175f5c6f8ad3a3ca5d830cd69dae" alt="Select preset template" width="1783" height="887" data-path="images/zh/deploy/bots/dingtalk/dingtalk9.png" />

Click Use

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk10.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=44afe3ee6c64814d31d1fe93fcfb26a8" alt="Click" width="1784" height="886" data-path="images/zh/deploy/bots/dingtalk/dingtalk10.png" />

Create

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk11.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=f5a8335d289e4f8901def18f17aba1c4" alt="Create" width="1852" height="885" data-path="images/zh/deploy/bots/dingtalk/dingtalk11.png" />

After clicking Create you'll be redirected to edit the template. As shown, you can freely edit your desired card message:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk12.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=57270a6ec2901bdecf9944749fb6bdbe" alt="Edit template" width="1882" height="863" data-path="images/zh/deploy/bots/dingtalk/dingtalk12.png" />

For the main content, keep the default 'content' unchanged:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk13.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=2ae8c33e28bbec44274ce6e12a7b432c" alt="Don't modify" width="1865" height="873" data-path="images/zh/deploy/bots/dingtalk/dingtalk13.png" />

Widescreen configuration parameters, you need to add . in the template variables. See [DingTalk Widescreen Configuration](https://open.dingtalk.com/document/development/configure-widescreen-cards)

<img src="https://mintcdn.com/langbot/2pmHSrcXVaqATWcs/images/zh/deploy/bots/dingtalk/dingtalk16.png?fit=max&auto=format&n=2pmHSrcXVaqATWcs&q=85&s=df26ceefb6e642960f490914e5d64197" alt="Widescreen Configuration" width="1469" height="748" data-path="images/zh/deploy/bots/dingtalk/dingtalk16.png" />

After editing and confirming everything is correct, save it and copy the template ID to fill in the configuration file:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk14.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=dbababb8ae8b543320d07b10f413a9d2" alt="Save" width="1891" height="889" data-path="images/zh/deploy/bots/dingtalk/dingtalk14.png" />

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk15.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=1df9c80e058e6b4d1179c0f4d466fcd6" alt="Copy template ID" width="1876" height="830" data-path="images/zh/deploy/bots/dingtalk/dingtalk15.png" />

### Fill in Configuration Information

Click `Credentials and Basic Information`, record `Client ID` and `Client Secret`,
Click `Application Capabilities`, `Robot`, record the RobotCode and Robot Name.
`markdown_card` is whether to enable Markdown form replies. When this configuration item is disabled, the `@Sender` configuration switch will not take effect.
Record the above configuration items and fill them in the LangBot bot configuration form

Click [Card Platform](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV), copy the corresponding bound template ID from the template list, and fill it into the card template ID field.

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/connect_to_langbot.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=d889f10985df895cd787dcbe222606c4" alt="Connect to LangBot" width="1024" height="1644" data-path="images/zh/deploy/bots/dingtalk/connect_to_langbot.png" />

Streaming related:

<img src="https://mintcdn.com/langbot/2pmHSrcXVaqATWcs/images/zh/deploy/bots/dingtalk/dingtalk17.png?fit=max&auto=format&n=2pmHSrcXVaqATWcs&q=85&s=f8d20487002d2fbc0e40522ec523cd01" alt="img.png" width="1393" height="708" data-path="images/zh/deploy/bots/dingtalk/dingtalk17.png" />

**Start LangBot**.

### Add Bot

This article uses DingTalk Windows desktop version as an example, click `Search` at the top, `Features`, then enter the name of the bot you just created, as shown:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/dingtalk/dingtalk5.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=4c20eda4a1802d4e273b0db6664562a5" alt="robot_png" width="1013" height="629" data-path="images/zh/deploy/bots/dingtalk/dingtalk5.png" />

Click on the bot to chat with it.

If you want to add it to a group, click `Group Management`, `Robots`, `Add Robot` in the DingTalk group, then search for the bot name to use it in the group.
