Answer Slack knowledge questions with Notion, Google Drive, Pinecone, and OpenAI
Quick overview This workflow syncs Notion pages and Google Drive files into a Pinecone vector index nightly, then answers Slack @mentions using an OpenAI chat model with retrieval from that Pinecone knowledge base and replies with a source URL.
How it works Runs every night at 2am and searches for content across Notion and Google Drive. Combines both result sets into a single normalized list of documents with IDs, titles, URLs, and source labels. Iterates through each document and extracts plain text either from Notion page blocks or by downloading and text-extracting the Google Drive file. Generates OpenAI embeddings and inserts each document plus metadata into a Pinecone index. Triggers when the bot is @mentioned in a specified Slack channel, cleans the message to a plain question, and keeps the thread context. Uses an OpenAI chat model with a Pinecone retrieval tool to answer the question and posts the response back to the originating Slack thread, while sending any workflow errors to an ops Slack channel.
Setup Add credentials for Notion, Google Drive, Slack, OpenAI, and Pinecone. Create or select a Pinecone index and replace the placeholder index name in both the ingestion and retrieval Pinecone nodes. Set the Slack channel ID for Q&A mentions and the ops-alerts channel ID for error notifications, then install/configure the Slack app so it can receive app_mention events.
Tags
Related Templates
Track OpenAI Token Usage and AI Agent Metrics with Google Sheets Dashboard
What it does Captures token usage and cost from your AI Agent/LLM. Logs model, tokens, cost, tool use, and conversation ...
Summarize SERPBear data with AI (via Openrouter) and save it to Baserow
Who's this for? If you own a website and need to analyze your keyword rankings If you need to create a keyword report on...
Send Daily Weather Forecasts from OpenWeatherMap to Telegram with Smart Formatting
🌤️ Daily Weather Forecast Bot A comprehensive n8n workflow that fetches detailed weather forecasts from OpenWeatherMap...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments