workflows.fit
Back to n8n workflows
n8n templateFreeBy Paul

Build an All-Source Knowledge Assistant with Claude, RAG, Perplexity, and Drive

📜 Detailed n8n Workflow Description Main Flow The workflow operates through a three-step process that handles incoming chat messages with intelligent tool orchestration: 1. Message Trigger: The When chat message rece...

Data & StorageAILangchainCore NodesChat TriggerMemory Postgres ChatEmbeddings Open AiReranker Cohere
Loading interactive preview...

Template notes

📜 Detailed n8n Workflow Description

Main Flow

The workflow operates through a three-step process that handles incoming chat messages with intelligent tool orchestration:

1. Message Trigger: The When chat message received node triggers whenever a user message arrives and passes it directly to the Knowledge Agent for processing.

2. Agent Orchestration: The Knowledge Agent serves as the central orchestrator, registering a comprehensive toolkit of capabilities: - LLM Processing: Uses Anthropic Chat Model with the claude-sonnet-4-20250514 model to craft final responses - Memory Management: Implements Postgres Chat Memory to save and recall conversation context across sessions - Reasoning Engine: Incorporates a Think tool to force internal chain-of-thought processing before taking any action - Semantic Search: Leverages General knowledge vector store with OpenAI embeddings (1536-dimensional) and Cohere reranking for intelligent content retrieval - Structured Queries: Provides structured data Postgres tool for executing queries on relational database tables - Drive Integration: Includes search about any doc in google drive functionality to locate specific file IDs - File Processing: Connects to Read File From GDrive sub-workflow for fetching and processing various file formats - External Intelligence: Offers Message a model in Perplexity for accessing up-to-the-minute web information when internal knowledge proves insufficient

3. Response Generation: After invoking the Think process, the agent intelligently selects appropriate tools based on the query, integrates results from multiple sources, and returns a comprehensive Markdown-formatted answer to the user.

Persistent Context Management

The workflow maintains conversation continuity through Postgres Chat Memory, which automatically logs every user-agent exchange. This ensures long-term context retention without requiring manual intervention, allowing for sophisticated multi-turn conversations that build upon previous interactions.