Answer Slack knowledge base questions with Notion, Pinecone, and OpenAI
Needs changesWhat this workflow does
This AI workflow has 15 nodes and runs on a schedule (every 24 hours) (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Notion, Pinecone Vector Store and Embeddings OpenAI and 1 more.
How it runs
Trigger: On a schedule (every 24 hours) (plus 1 other trigger).
- Fetch Notion KB Pages (Notion): get many (database page)
- Filter Out Bots and System Messages (If): checks a condition and branches into true / false
- Retrieve Notion Blocks (Notion): get many (block)
- CubeBot AI Agent (AI Agent): runs an AI agent, with model: OpenAI GPT-4 Chat Model; 1 tool (Pinecone KB Search)
- Prepare Document Metadata (Code): runs custom JavaScript code
- Post Reply in Slack Thread (Slack): uses Slack
- Insert Vectors into Pinecone (Pinecone Vector Store): stores documents in the Pinecone vector store, with embeddings: OpenAI Embeddings Ingestion; document loader: Load Data for Vectors
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in CubeBot AI Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Also check Slack Trigger requires a signing secret on the Slack API credential.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) CubeBot AI Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (12)
- Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Notion
n8n-nodes-base.notion - Code
n8n-nodes-base.code - Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Slack Trigger
n8n-nodes-base.slackTrigger - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow syncs an internal Notion knowledge base to Pinecone on a daily schedule, then runs a Slack bot that answers questions in a specific channel using Pinecone retrieval and an OpenAI chat model, replying in a thread with citations…