An AI bot is only as smart as the data it can access. This workflow relies on several external data sources that act as its brain 🧠, its memory 🗂️, and its reference guide 📖. For this scenario to work in your own environment, you would need to set up these sources and connect them to the appropriate nodes. Here’s a look at each one and its purpose.
📚 The RAG Documentation Database (Cloudflare)
This is the bot's long-term memory and its primary source of knowledge for answering user questions about the product.
- 🎯 Purpose: Instead of storing documentation inside the workflow, we use a Cloudflare RAG (Retrieval-Augmented Generation) database. This allows the AI agent to perform "semantic searches"—it can understand the meaning of a user's question and find the most relevant sections of the documentation, even if the keywords don't match exactly.
🧩 Nodes That Use It:
- rag_database_docs (Node 10)
- rag_database_docs (Node 23)
🔧 Setup Requirements:
- Create a RAG Instance: You would need to set up your own Cloudflare AutoRAG project.
- Populate with Data: This instance must be populated with your entire knowledge base: documentation articles, tutorials, FAQs, and guides.
- Update Credentials: In the Latenode scenario, you would need the URL endpoint and Authorization token for of Nodes 10 and 23 with the credentials for your Cloudflare RAG instance.
📇 The Session/Thread Database (Baserow)
This database acts as the bot's short-term memory, allowing it to recognize users and maintain context across multiple interactions.
- 🎯 Purpose: This simple database has one crucial job: to link a user to a specific conversation thread. When a user messages for the first time, the bot creates a new session ID and saves it here alongside the user's email. On every subsequent message, the bot first checks this database. If the user's email is found, it retrieves the session ID, allowing the AI agent to access the history of that specific conversation.
- 🧩 Nodes That Use It:
- Check Database (Check if Thread ID Exists) (Node 5): Performs a GET request to search for the user's email.
- Save Thread ID to Database (Node 27): Performs a POST request to create a new record for a new user.
- 🔧 Setup Requirements:
- Create a Baserow Table: You need a table in Baserow (or any similar database service) with at least two columns:
- UserID (Text Field): To store the user's email address.
- ThreadID (Text or Number Field): To store the unique session ID generated by the workflow.
- Update Credentials: You must add your API endpoint for your Baserow table and update the headers to use your unique Baserow Authorization token.
🔗 The Documentation Links Sheet (Google Sheets)
This simple spreadsheet acts as a verified, trusted source for URLs, ensuring the bot never provides users with broken or incorrect links.
- 🎯 Purpose: While the RAG database provides the content for an answer, this sheet provides the link. When an AI agent decides a user would benefit from a link to a specific documentation page, it uses this tool to find the correct URL. This prevents the AI from "hallucinating" or guessing URLs, which is a common problem.
- 🧩 Nodes That Use It:
- docs_links (Node 12)
- docs_links (Node 25)
- 🔧 Setup Requirements:
- Create a Google Sheet: 📄 The sheet needs a simple structure, with columns such as:
- Column A (Topic/Keyword): A simple identifier for the page (e.g., "HTTP Node Configuration"). This is what the agent would search for.
- Column B (URL): The full, correct URL to the documentation page.
- Column C (Title/Description): The official title of the documentation page.
- Connect to Latenode: You need to establish a connection to your Google account in Latenode.
- Configure the Nodes: In Nodes 12 and 25, you would need to select your Google connection, then choose the specific Spreadsheet and Sheet Name from the dropdown menus that you created for this purpose.