Build a LINE and Discord Order Lookup Bot with n8n, LangBot and GPT-6 Astra
Description and use
A LINE/Discord bot built with n8n, LangBot, and GPT‑6 Astra automatically extracts order IDs, looks them up via an API, and returns natural‑language status replies, reducing manual support.
Problem
Customers ask “Where is my order?” via chat, but a model cannot determine shipment status without deterministic lookup.
Outcome
The bot reliably answers order status queries, reducing manual support effort and providing consistent, natural‑language responses.
Workflow
- 1. Spin up Docker Compose with n8n, LangBot, and demo‑api services.
- 2. Configure n8n to receive webhooks from LangBot.
- 3. In n8n, parse incoming message to extract order ID using deterministic logic.
- 4. If ID missing or unknown, branch to a fallback response without calling GPT.
- 5. Call demo‑api to retrieve order details by ID.
- 6. Pass API response to GPT‑6 Astra for natural‑language explanation.
- 7. Return the formatted reply to the user via LangBot on LINE or Discord.
Evidence
Where is my order? is a data lookup wearing the clothes of a chat question.
Missing IDs and unknown orders take a separate branch before any model call.
- Record date: 2026-09-21T12:30:33.705Z