Slack AI Assistant with Webhook Integration
detail.loadingPreview
This workflow sets up a Slack AI assistant that responds to messages received via a webhook. It uses Google Gemini Chat Model for AI processing and a Window Buffer Memory node to maintain conversation history.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow automates a Slack AI assistant. It leverages a webhook to receive messages, processes them using a Google Gemini Chat Model, and sends a response back to Slack. The workflow also incorporates a memory node to retain conversation context, allowing for more natural and coherent interactions. This is particularly useful for building custom Slack bots that can handle inquiries, provide information, or automate tasks based on user input.
Key Features
- Receives messages from Slack via a configurable POST webhook.
- Integrates with Google Gemini Chat Model for advanced AI-powered responses.
- Utilizes Window Buffer Memory to maintain conversation history and context.
- Sends AI-generated responses back to the designated Slack channel.
- Customizable system message for the AI agent to define its persona and task.
How To Use
- Configure the
Webhook to receive messagenode with a unique path and ensure it's publicly accessible (e.g., using ngrok or a deployed n8n instance). - Set up a Slack app with an event subscription to trigger this webhook endpoint when messages are received.
- Connect the
Google Gemini Chat Modelnode, ensuring you have the necessary API keys and have selected your desired model (e.g.,models/gemini-1.5-flash-latest). - Configure the
Window Buffer Memorynode. Crucially, set thesessionKeyto dynamically capture the session ID from the incoming webhook body (e.g.,={{ $('Webhook to receive message').item.json.body.token }}). - Adjust the
Agentnode'stextparameter to reference the incoming message (e.g.,={{ $json.body.text }}) and customize thesystemMessageto define the AI's role. - In the
Send response back to slack channelnode, configure the message content, ensuring it correctly references the AI's output and the incoming message details (likechannel_idanduser_name). - Deploy your n8n workflow and test by sending a message to your configured Slack integration.
Apps Used
Workflow JSON
{
"id": "3c615fff-b82c-42a5-a236-dbafa08ebbc4",
"name": "Slack AI Assistant with Webhook Integration",
"nodes": 0,
"category": "AI & Chatbots",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 3c615fff-b82c...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Build a WhatsApp AI Concierge for Hotels with n8n
Automate hotel guest inquiries with an n8n WhatsApp chatbot. This workflow uses an AI node to process messages against a hotel encyclopedia, ensuring accurate and professional responses.