Building AI Customer Service with N8N: Scraping Travel Site Data for Knowledge Bases
This article walks through using the open‑source workflow tool N8N to automatically fetch scenic‑spot data from the Ly.com travel site, transform it with an AI node, and ingest the structured knowledge into FastGPT, enabling an AI‑powered customer service chatbot without writing custom code.
Overview
In the previous post the author introduced Retrieval‑Augmented Generation (RAG) and demonstrated the FastGPT UI for RAG. This fourth installment focuses on the first step of building an AI customer‑service system: preparing data and cleaning knowledge before importing it.
Goal
Use N8N, an open‑source workflow automation platform, to automatically collect scenic‑spot information from the Chinese travel website Ly.com , format the data, and store it in a FastGPT knowledge base, thereby enabling AI‑driven Q&A for travel attractions.
Workflow Diagram
Resulting Data Format
About N8N
N8N is an open‑source workflow automation platform with native AI support. It combines a visual drag‑and‑drop builder with code extensibility. As of 27 May 2025 it has 99 K stars on GitHub. Core capabilities include:
Visual builder + code extension : connect 400+ app nodes, support conditional branches and error retries.
Multi‑step AI agents : build complex AI workflows using LangChain.
Private deployment : one‑click Docker deployment, fully offline operation.
Code embedding : insert JavaScript or Python snippets at any step.
Debug tools : step‑by‑step retry, data simulation, real‑time logs.
Enterprise security : SSO, RBAC, audit logs, encrypted storage.
Template marketplace : 1 200+ ready‑made workflow templates.
Installation
docker volume create n8n_data</code><code>docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8nAfter the container starts, open http://localhost:5678 in a browser, register a user, and access the N8N dashboard.
Building the Workflow
The workflow consists of four nodes:
Webhook node : receives external requests, acting as the workflow’s entry point.
HTTP request node : fetches the scenic‑spot page from https://www.ly.com/scenery/BookSceneryTicket_32291.html.
AI node : parses the HTML and extracts structured information using a prompt (see below).
HTTP request node : sends the extracted data to FastGPT’s knowledge‑base API.
Each node is configured through the visual editor; screenshots in the original article illustrate the exact UI steps.
System Prompt for the AI Node
## Role
You are an expert in extracting and analyzing HTML page content. Extract the scenic‑spot title, level, description, address, and transportation info.
## Extraction Rules
1. Title is in the element with class "s_name".
2. Description is in class "s_des".
3. Address is in class "s_com s_address".
4. Additional info is in class "inf-f-con"; include images as Markdown if present.
5. Transportation details are in class "tra_line".
6. Return a Markdown‑formatted article without
characters.
## Output Format
### Scenic Spot Introduction
**Name**:
**Level**:
**Description & Images**
**Address**:
**Transportation**:FastGPT Integration
Steps to push data into FastGPT:
Create an API key in FastGPT.
Create a knowledge base and note its ID.
Build a JSON payload containing the Markdown result from the AI node.
Configure the second HTTP request node with the FastGPT endpoint, add the API key in the header, and set the request body to the JSON payload.
When the workflow is triggered (e.g., via Postman), the data flows through the nodes, and the final HTTP request writes the structured knowledge into FastGPT. The article shows screenshots of successful responses and the populated knowledge base.
Advantages of N8N
Open‑source & free : full data sovereignty, Docker‑based private deployment eliminates leakage risk.
Zero‑cost entry : self‑hosted without licensing fees.
400+ integrations : covers databases, cloud storage, hardware devices, enabling cross‑system automation.
Visual + code engine : suitable for both non‑technical users (drag‑and‑drop) and developers (custom JavaScript/Python).
Developer‑friendly : custom logic, micro‑service integration, reduces development cycles.
Drawback : learning curve requires understanding of APIs and workflow concepts.
Conclusion
The author demonstrates that combining N8N with FastGPT automates the entire pipeline—from web scraping to knowledge‑base ingestion—greatly improving efficiency and reducing manual errors in building an AI‑driven travel‑site customer service.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ubiquitous Tech
A ubiquitous public account for pirate enthusiasts, regularly sharing curated experiences, tech learning, and growth insights. Currently publishing articles on AI RAG customer service, AI MCP technology, and open-source design. Personal free Knowledge Planet: Awakening New World Programmer.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
