diff --git a/docs.json b/docs.json index 1326fa5e..360dec93 100644 --- a/docs.json +++ b/docs.json @@ -425,7 +425,8 @@ "en/learn-more/use-cases/how-to-connect-aws-bedrock", "en/learn-more/use-cases/dify-schedule", "en/learn-more/use-cases/building-an-ai-thesis-slack-bot", - "en/learn-more/use-cases/build-ai-sales-avatar" + "en/learn-more/use-cases/build-ai-sales-avatar", + "en/learn-more/use-cases/connect-dify-to-various-im-platforms-by-using-langbot" ] }, { diff --git a/en/learn-more/use-cases/connect-dify-to-various-im-platforms-by-using-langbot.mdx b/en/learn-more/use-cases/connect-dify-to-various-im-platforms-by-using-langbot.mdx new file mode 100644 index 00000000..a0f38052 --- /dev/null +++ b/en/learn-more/use-cases/connect-dify-to-various-im-platforms-by-using-langbot.mdx @@ -0,0 +1,78 @@ +--- +title: Quickly Connect Dify to Slack, Lark, Discord, Telegram and Other Platforms +--- + +## 1. Overview + +There are various IM platforms in the market, each with different methods for bot integration and varying levels of difficulty, making it challenging to quickly connect to LLMOps platforms like Dify and leverage its powerful ecosystem. With [LangBot](https://github.com/RockChinQ/LangBot), you can quickly integrate Dify with platforms such as QQ, WeChat, Feishu, DingTalk, Telegram, Discord, and Slack to provide services. Additionally, LangBot offers extension mechanisms and a rich ecosystem to flexibly meet your needs. + +## 2. Deploying LangBot + +### 2.1. Deploying LangBot + +You can deploy LangBot in three ways: + +1. Docker deployment: [Link](https://docs.langbot.app/en/deploy/langbot/docker.html) +2. Manual deployment: [Link](https://docs.langbot.app/en/deploy/langbot/manual.html) +3. Deployment using aaPanel: [Link](https://docs.langbot.app/en/deploy/langbot/one-click/bt.html) + +### 2.2. Connecting to Messaging Platforms + +Refer to [this page](https://docs.langbot.app/en/deploy/platforms/readme.html) to choose your messaging platform, such as Slack, Lark, DingTalk, Telegram, Discord, etc. + +## 3. Integrating with Dify + +LangBot uses `Pipelines` to control message processing. When first started, LangBot automatically creates a default pipeline. Go to the pipeline configuration page and click to open the pipeline configuration. +Select the `AI` tab and switch the runner to `Dify Service API`. + +![](edit_runner_in_pipeline_config) + +Fill in your Dify service's API endpoint address, Dify application type, and API Key. After completion, you can chat with the bot in your instant messaging software. + +When using workflow applications, please use `summary` as the key to return workflow execution results. + +![](https://assets-docs.dify.ai/2025/03/a0359b706a8e7526c12487dc6d78c983.png) + +When using workflows, LangBot will explicitly pass the following parameters, which you can add in the start node of your Dify workflow: + +- `user_message_text`: Plain text of user message +- `session_id`: User session ID, `person_` for private chats, `group_` for group chats +- `conversation_id`: String, user session ID generated by LangBot. Regenerated when user resets session +- `msg_create_time`: Numeric type, timestamp (in seconds) when message was received + +You can [customize any variables through plugins](https://docs.langbot.app/en/plugin/dev/api-ref.html) + +![](https://assets-docs.dify.ai/2025/03/6db041d813987581b27ce434001575bb.png) + +- For detailed instructions, please refer to the LangBot documentation + +## 4. Demo + +> Below shows WeChat and Feishu examples only. Other platforms like QQ, DingTalk, Telegram can also be integrated + +![](https://assets-docs.dify.ai/2025/03/88bfcb4e72ab852069d49104ad7aa51d.png) + +![](https://assets-docs.dify.ai/2025/03/9682c62f9bcafcffb0b61c2b0f5a6cb1.png) + +{/* +Contributing Section +DO NOT edit this section! +It will be automatically generated by the script. +*/} + + + + Help improve our documentation by contributing directly + + + Found an error or have suggestions? Let us know + +