Deploy a sophisticated RAG pipeline using an n8n workflow. Integrate Slack, Google Sheets, Pinecone vector database, and Azure OpenAI to build a context-aware AI Agent.
Download this n8n workflow template and start using it instantly.
Teams needing a context-aware Slack bot for quick knowledge retrieval.
Developers building complex AI Agents using n8n and LangChain.
This is an advanced n8n workflow designed for high-performance, context-aware slack automation. It combines the versatility of n8n's core capabilities with the power of LangChain AI Agents, Azure OpenAI services (for chat and embeddings), and Pinecone vector databases. The solution addresses the challenge of providing up-to-date, structured answers by leveraging multiple knowledge sources (Google Sheets for structured data, Pinecone for vector data) and refining the output through iterative AI Agents and sophisticated parsing. This n8n template is crucial for creating robust internal knowledge management systems accessible directly via Slack, reducing dependency on external tools.
Slack Trigger n8n node).Get a user's profile).AI Agent1. This agent utilizes an Azure OpenAI Chat Model1 and multiple tools: Google Sheets (for structured data lookup) and Pinecone Vector Store2 (for vector search, powered by Embeddings Azure OpenAI2 and refined by Reranker Cohere1).AI Agent1 processes the query and generates a structured output using Structured Output Parser1. The resulting enriched context is then indexed into a temporary storage in the knowledge base using Pinecone Vector Store5.AI Agent3. This second agent uses the refined context as its input, leveraging Azure OpenAI Chat Model3 and using VStore 5 itself as a retrieval tool, ensuring high context fidelity.AI Agent3 uses an Auto-fixing Output Parser to guarantee the final response adheres to a strict schema, ensuring reliability, which often uses the Structured Output Parser2 definition.Edit Fields1 n8n node and finally indexed into a persistent vector store (Pinecone Vector Store3), completing the cycle of retrieval, refinement, and knowledge update.Slack Trigger and the Slack n8n node (Get a user's profile). Ensure your Slack app has the necessary event subscriptions and scope permissions.Azure OpenAI Chat Model1/3) and all three Embeddings n8n nodes (Embeddings Azure OpenAI2/3/5). You must specify the deployment names for your models.Pinecone Vector Store n8n nodes (2, 3, and 5). Note the connection details for your target indexes.Get row(s) in sheet in Google Sheets n8n node and the Cohere service required by the Reranker Cohere n8n nodes. Slack Trigger: The initiating n8n node. It acts as the n8n trigger, listening for Slack events (like new channel messages) to start the automation.
AI Agent1 / AI Agent3 (LangChain): Core orchestration n8n node. These agents define the prompt template and the sequence of tools (Pinecone, Google Sheets) and models they use to process the Slack query.
Azure OpenAI Chat Model1 / 3 (LangChain): Provides the large language model capabilities used by the AI Agents for complex reasoning and generation within the n8n workflow.
Pinecone Vector Store2 / 3 / 5 (LangChain): Manages read (retrieval) and write (indexing) operations with the Pinecone vector database. Critical for the RAG functionality in this n8n template.
Embeddings Azure OpenAI2 / 3 / 5 (LangChain): Transforms input text into vector representations, a key step before data can be stored or searched in the Pinecone vector database.
Reranker Cohere1 / 3 (LangChain): Used after initial vector retrieval to re-sort context documents based on relevance, ensuring high-quality input for the LLM.
Get row(s) in sheet in Google Sheets: Acts as a specialized tool for AI Agent1, allowing the AI to retrieve structured data directly from Google Sheets based on the query.
Structured Output Parser1 / 2 (LangChain): Enforces a predefined data structure (schema) on the LLM’s output, ensuring that the n8n workflow handles reliable, predictable data.
Structured Output Parser2, maximizing workflow reliability.Build a secure user authentication backend with this powerful n8n workflow. Includes signup, signin, and password reset using PostgreSQL's pgcrypto for bcrypt hashing.

Use this powerful n8n workflow to deploy a complete AI HR department. Featuring a strategic CHRO agent and specialist teams (Recruiter, Policy Writer, Compensation), this n8n automation leverages OpenAI O3 and GPT-4.1-mini for cost-effective, complex HR solutions.

Deploy a complete AI Engineering Department using this advanced n8n workflow. The CTO n8n agent delegates tasks to specialized DevOps, Security, and Architect agents powered by OpenAI models.

Build a sophisticated multilingual AI voice agent using n8n, GPT-5, Google Calendar, and Google Sheets. This advanced n8n workflow automates support, scheduling, and email confirmations.

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.







































