Block 1 - Chat Interface
- Type / Role
- @n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
- Config choices
- Version 1.1
This workflow is provided as-is. Please review and test before using in production.
This workflow contains community nodes that are only compatible with the self hosted version of n8n. Build intelligent AI chatbot with RAG and Cohere Reranker Who is it for? This template is perfec...
@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.embeddingsopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.manualtrigger, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.documentdefaultdataloader
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Anderson Adelino.
Original n8n.io sourceThis workflow contains community nodes that are only compatible with the self-hosted version of n8n.
This template is perfect for developers, businesses, and automation enthusiasts who want to create intelligent chatbots that can answer questions based on their own documents. Whether you're building customer support systems, internal knowledge bases, or educational assistants, this workflow provides a solid foundation for document-based AI conversations.
This workflow creates an intelligent AI assistant that combines RAG (Retrieval-Augmented Generation) with Cohere's reranking technology for more accurate responses:
First, create a table in Supabase with vector support:
CREATE TABLE cafeina (
id SERIAL PRIMARY KEY,
content TEXT,
metadata JSONB,
embedding VECTOR(1536)
);
-- Create a function for similarity search
CREATE OR REPLACE FUNCTION match_cafeina(
query_embedding VECTOR(1536),
match_count INT DEFAULT 10
)
RETURNS TABLE(
id INT,
content TEXT,
metadata JSONB,
similarity FLOAT
)
LANGUAGE plpgsql
AS $$
BEGIN
RETURN QUERY
SELECT
cafeina.id,
cafeina.content,
cafeina.metadata,
1 - (cafeina.embedding <=> query_embedding) AS similarity
FROM cafeina
ORDER BY cafeina.embedding <=> query_embedding
LIMIT match_count;
END;
$$;
Add the following credentials in n8n:
URL DO ARQUIVO with your Google Drive file URLOnce documents are loaded, activate the main workflow and start chatting with your AI assistant through the chat interface.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Document-based AI chatbot with RAG, OpenAI and Cohere reranker |
|---|---|
| Complexity | advanced |
| Nodes | 18 |
| Categories | Internal Wiki, AI RAG |
| Author | Anderson Adelino |
| Published | 25 Jul 2025 |
Use the JSON export at /data/workflows/6401/6401.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
This workflow contains community nodes that are only compatible with the self hosted version of n8n. Build intelligent AI chatbot with RAG and Cohere Reranker Who is it for? This template is perfec...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI RAG use case.