Slack AI ChatBot : context-aware, replies to mentions AND also DMs
Needs changesWhat this workflow does
This AI workflow has 12 nodes and runs on Slack events. Along the way it connects Pinecone Vector Store, Embeddings OpenAI, Slack and OpenAI Chat Model.
How it runs
Trigger: On Slack events.
- Mapping data for the Agent (Edit Fields (Set)): sets or maps fields
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 2 tools (Think, Get the history of a channel in Slack); memory: Simple Memory
- Either the bot should reply in dm or in public channel (If): checks a condition and branches into true / false
- Reply to DM (Slack): uses Slack
- Reply to public mention (Slack): uses Slack
- Pinecone Vector Store: uses the Pinecone vector store, with embeddings: Embeddings OpenAI
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 AI Agent1 (v1.8): 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.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent1 (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Think Tool
@n8n/n8n-nodes-langchain.toolThink - Slack
n8n-nodes-base.slack - Slack Tool
n8n-nodes-base.slackTool - Slack Trigger
n8n-nodes-base.slackTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
From the author
Click here to access this Workflow for free. --- Get your own custom ChatGPT inside your Slack Workspace Description This n8n workflow enables a fully autonomous AI assistant within your Slack Workspace. It listens for both public mentions and direct messages…