Generate Contextual Recommendations from Slack using Pinecone

Go to Workflow
6 views
Built by Rahul Joshi Rahul Joshi
Created on July 15, 2025

Description

This advanced Retrieval-Augmented Generation (RAG) automation template for n8n enables contextual, real-time recommendations using Slack messages as input. The workflow extracts referenced documents from Google Drive, performs semantic retrieval from Pinecone, and generates next-step advice using GPT-4o β€” tailored specifically for executives and knowledge workers.

Perfect for AI copilots, Slack-based assistants, or CTO coaching tools, this no-code RAG implementation gives you the building blocks to combine unstructured inputs with memory-augmented intelligence.

What This Template Does

βœ… Triggers from a Slack Message or Mention
Monitors a Slack channel using a bot, capturing user input in real-time.
πŸ” Extracts Key Info from Message
GPT-4o parses the message to identify the subject person and Google Drive link (if present).
πŸ“₯ Downloads File from Google Drive
Automatically fetches and extracts PDF content using the built-in extractor.
πŸ“‡ Retrieves Metadata from Google Sheets & Pinecone

Looks up user ID from Google Sheets and retrieves context from Pinecone based on embeddings and reranking.

🧠 Contextual Response via GPT-4o (RAG)
Combines user data and document context to generate a single, actionable next step using a tightly scoped GPT-4o prompt.

πŸ› οΈ Auto-Fixes & Structures Output
Ensures formatted response with recommended_action, rationale, and optional risk_note.

πŸ“¨ Sends Final Output Back to Slack
Posts the recommendation directly to the channel as a reply.

Required Integrations

Slack Bot with channels:history & app_mentions:read
Google Drive OAuth for file fetching
Google Sheets for ID mapping
Pinecone for vector document retrieval
Azure OpenAI or OpenAI GPT-4o for language processing
(Optional) Cohere for reranking results

Ideal Use Cases

πŸ§‘β€πŸ’Ό Executive coaching bots (e.g., for CTOs or founders)
🧠 Slack-based internal AI assistants
πŸ“„ AI-powered document summarization with memory
πŸ’¬ Actionable recommendations based on real Slack conversations
πŸ“Š Enterprise knowledge augmentation from vector DBs

Why This Template Stands Out

Combines live Slack interaction, file ingestion, and Pinecone retrieval into a fully RAG-powered response system.
AI prompts are carefully scoped for actionable, context-aware, and time-bound responses.
No-code setup with modular components for scaling or adapting to new use cases (e.g., different roles or goals).

This workflow was created by Rahul Joshi and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (9)

AI Agent
@n8n/n8n-nodes-langchain.agent
Auto-fixing Output Parser
@n8n/n8n-nodes-langchain.outputParserAutofixing
Azure OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatAzureOpenAi
Embeddings Azure OpenAI
@n8n/n8n-nodes-langchain.embeddingsAzureOpenAi
Google Drive
n8n-nodes-base.googleDrive
Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone
Reranker Cohere
@n8n/n8n-nodes-langchain.rerankerCohere
Slack
n8n-nodes-base.slack
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured