DEV Community

Cover image for Turn Product Docs into a Slack Support Bot with GPT-6 Astra, Dify and LangBot
Rock
Rock

Posted on Fully Autonomous

Turn Product Docs into a Slack Support Bot with GPT-6 Astra, Dify and LangBot

The support questions that interrupt a team are often tiny: “How long is the trial?” or “Where do I export a CSV?” The answer exists, but somebody still has to find it and paste it into Slack.

I built a product-guide assistant that retrieves a document before answering and says when the document has no answer. Dify handles retrieval and generation; LangBot connects the app to the channels where people ask. This walkthrough starts with the local deployment and includes the actual retrieval and chat results.

The assistant returns the export steps, retention period, and document citation.

The assistant returns the export steps, retention period, and document citation.

Start with a working Dify and LangBot installation

You need Docker Compose, Git, Python 3, and credentials for a provider that exposes gpt-6-astra. I deployed Dify 1.17.1 and LangBot v4.10.11 locally for this walkthrough. The screenshots show those running installations in English.

The repository includes a small setup wrapper so the ports and Docker network match this article. Run it from a location without an existing tutorial-runtime directory:

git clone https://github.com/langbot-app/langbot-marketing.git
cd langbot-marketing
bash series/dify-gpt-6-astra/examples/setup-local.sh
Enter fullscreen mode Exit fullscreen mode

The wrapper clones the pinned Dify release, generates local service passwords, and starts LangBot with its plugin runtime. It contains no model credentials. Allow time for the first image downloads and leave enough memory and disk space for the Dify stack.

Initialize Dify at http://localhost:8088 and LangBot at http://localhost:5368. Create your own administrator accounts and choose English in both interfaces.

The first-run screen of the local Dify deployment.

The first-run screen of the local Dify deployment.

The local LangBot installation before administrator setup.

The local LangBot installation before administrator setup.

There are two different addresses to keep straight: your browser opens Dify at http://localhost:8088; LangBot calls it at http://nginx/v1 over the shared Docker network. Using the browser's localhost address inside the LangBot container will point at the wrong service.

Connect GPT-6 Astra to Dify

Open Integrations → Model Provider, install the official OpenAI-API-compatible provider, and choose Add Model. I tested provider version 0.0.66 with an OpenAI-compatible gateway.

Field Tutorial setting
Model Name / endpoint model name gpt-6-astra
Model Type / Completion mode LLM / Chat
Model display name GPT-6 Astra
API Base URL Your provider's compatible endpoint, usually ending in /v1
API Key Your own provider key
API Type Chat Completions API
Context size / maximum-token ceiling 32768 / 4096 for this example

Those limits are conservative settings for this tutorial, not a statement of Astra's full specifications. Save the model and let Dify validate the connection. Replace the gateway shown in the screenshot with your own authorized endpoint. Provider capabilities can differ; see the official GPT-6 Astra guide when configuring direct OpenAI access.

The custom model form, captured before entering the API key.

The custom model form, captured before entering the API key.

Give the bot a small, testable knowledge source

For the example, I wrote a bilingual guide for a fictional product called Northstar Desk. It specifies a 14-day trial, 5 teammates, 2 shared inboxes, CSV export permissions, and 48-hour invitation links. It explicitly leaves enterprise pricing and refund rules unspecified.

That last detail makes the test useful. A bot that sounds confident about everything is difficult to trust. We need both questions the guide can answer and questions it cannot.

Download the sample product guide. In Dify, open Knowledge → Create → Create a ready-to-use knowledge base, then upload the Markdown file.

Upload the sample guide into a new knowledge base.

Upload the sample guide into a new knowledge base.

Choose General chunks, a \n\n delimiter, maximum length 1024, and overlap 50. Use Economical indexing with Top K 3. This uses keyword retrieval and avoids adding an embedding provider just to reproduce a small guide.

For a larger corpus with varied terminology, compare that baseline with High Quality vector or hybrid retrieval. Keyword search is a deliberate shortcut in this example, not a universal recommendation for production RAG.

The preview shows 11 chunks, including separate trial and export sections.

The preview shows 11 chunks, including separate trial and export sections.

The document has finished processing.

The document has finished processing.

Name the knowledge base Northstar Desk Product Guide. Before building the chatbot, use Retrieval Testing with export CSV tickets and inspect the returned passages. This separates a retrieval problem from a generation problem.

Check the source passages directly before relying on the final answer.

Check the source passages directly before relying on the final answer.

Build the retrieval Chatflow

Create a Chatflow called Astra Product Guide. Connect four nodes:

User Input → Knowledge Retrieval → LLM → Answer

The complete running knowledge workflow.

The complete running knowledge workflow.

Set the retrieval query to sys.query and select your knowledge base. In the LLM node, choose GPT-6 Astra and bind Context to the retrieval node's result. The Answer node returns the LLM's text.

The retrieval node reads the user's question and searches the selected guide.

The retrieval node reads the user's question and searches the selected guide.

The important part of the system prompt is:

You are the Northstar Desk help assistant.
Answer only from the supplied knowledge context.
Reply in the language of the user's question.
Give the exact steps when available and name the relevant guide section.
If the context does not contain the answer, say the guide does not specify it
and suggest contacting human support. Never invent pricing or refund rules.
Knowledge context:
{{#context#}}
Enter fullscreen mode Exit fullscreen mode

I asked, “How do I export tickets, and how long is the CSV available?” The answer gave Settings > Data > Export, stated that exports are available for 7 days, and noted the owner-only permission. It also displayed a citation to the guide.

When asked about enterprise pricing and refunds, it explained that the guide did not specify them. That is the second half of the test, and it is just as useful as a correct positive answer.

An out-of-scope question is answered without inventing a policy.

An out-of-scope question is answered without inventing a policy.

Put LangBot in front of the app

Publish the saved version in Dify. Open Access Point → Backend Service API → API Key and create a key for this app.

In LangBot, choose Create Pipelines, name the pipeline Astra Product Guide, and open Configuration → AI:

Field Value
Runner Dify Service API
Base URL http://nginx/v1
App Type Chat
API Key The Dify app key you just created

The Dify app key belongs here. The Astra provider key stays in Dify. Save the pipeline, then use Debug Chat to check the complete request and response path before adding a messaging platform.

The LangBot pipeline settings, captured before entering the app key.

The LangBot pipeline settings, captured before entering the app key.

Check the response through LangBot

I repeated the trial question in LangBot Debug Chat. It returned the same 14-day and 5-teammate limits. I also checked an unsupported pricing question in Chinese; the language changed, while the document boundary remained.

The knowledge answer arrives through LangBot.

The knowledge answer arrives through LangBot.

Once this is in a support channel, keep the guide as the place where product rules are maintained. Update the source, reprocess it, and rerun a small set of positive and unknown-answer questions. That maintenance loop is easier to inspect than a collection of slightly different prompts in different bots.

Connect it to Slack and Telegram

Choose Create Bots in LangBot, select your adapter, and enter credentials from that platform. After creating the bot, select the pipeline you just built. Check the pipeline's trigger rules for direct messages, group messages, and mentions before inviting it into a channel.

The measured path in this walkthrough is LangBot → Dify → GPT-6 Astra → LangBot. I inspected the real adapter forms below; I did not authorize a live Slack workspace, Discord server, Telegram bot, or LINE account for this demo.

Platform Setup path
Slack Create a Slack app, grant the required bot scopes, install it to the workspace, and enter the Bot Token and Signing Secret in LangBot. Configure event subscriptions with the public HTTPS callback from the bot setup, verify it, and invite the bot to the intended channel.
Discord Create an application and bot in the Developer Portal. Enter Client ID and bot Token, enable the required message intents, then invite the bot with the appropriate channel permissions.
Telegram Create a bot with BotFather and enter its token. Start with a direct message; for groups, invite the bot and configure privacy mode and LangBot's trigger rules for the messages it should receive.
LINE Create a Messaging API channel. Enter the Channel access token and Channel secret, configure the public HTTPS webhook, enable webhook delivery, and avoid conflicting automatic replies.
Mattermost Enter the server URL and a Bot Account access token, then add that account to the relevant teams and channels. The adapter uses REST and WebSocket APIs.

The Slack adapter asks for a bot token and signing secret.

The Slack adapter asks for a bot token and signing secret.

The Telegram adapter uses a BotFather token and exposes reply options.

The Telegram adapter uses a BotFather token and exposes reply options.

The catalog also includes Matrix, Lark, DingTalk, WeCom, WeChat-related adapters, QQ, KOOK, OneBot v11, Satori, HTTP Bot, and Page Bot. See the platform-specific LangBot guides for the permissions and networking required by each adapter. In particular, the local-only deployment above needs a suitable public HTTPS endpoint for webhook-based integrations such as Slack and LINE.

Files and troubleshooting

Use the exported Dify app or follow the deployment and import notes. Select your own model after importing. For a knowledge app, replace the example's instance-specific knowledge reference with your own dataset.

When something fails, check the path in order: Dify preview, the published app version, LangBot's /v1 base URL and app type, then the platform's event delivery. If you change Dify service passwords, keep Redis and Celery credentials aligned, and do the same for Sandbox and its code-execution client.

My local proxy initially returned fake DNS addresses that Dify's SSRF proxy rejected. Correcting DNS fixed the plugin download without disabling network protections. For external API calls, inspect the run record after a retry rather than assuming that a transport error means the app configuration is wrong.

Sources and files: LangBot, Dify, and this tutorial's screenshots and configuration. The deployment and screenshots are from September 16, 2026; later versions may move some controls.

Top comments (0)