Build an intelligent Slack agent with conversation memory
Workflow Description
An automation that creates a smart agent within Slack, receiving user messages, maintaining conversation context through memory, and integrating with OpenAI and Twitter/X to deliver thoughtful, well-informed responses.
How it works
- 1.Receive messages through the Slack chat trigger
- 2.Process the message using OpenAI model while preserving prior context
- 3.Call external tools (Twitter/X) based on query requirements
- 4.Send the composed response back to the Slack channel
- 5.Store the interaction in memory for future conversations
Use cases
- Smart assistant answering team questions directly in Slack
- Gathering and summarizing Twitter/X data within discussions
- Managing sequential conversations with full context understanding
Requirements
- Active Slack workspace with message-sending permissions
- OpenAI API key configured
- Twitter/X credentials (optional based on use case)
- Webhook or Bot token setup for integration
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (17)
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note
Sticky Note
Sticky Note5
Sticky Note
Sticky Note4
Sticky Note
Sticky Note3
Sticky Note
Sticky Note6
Sticky Note
When chat message received
Chat Trigger
OpenAI Chat Model
OpenAI
Simple Memory
Memory Buffer Window
When Executed by Another Workflow
Execute Workflow Trigger
Check if user has provided email
If
Message Slack for help
Slack
Confirm that we've messaged a human
Code
Prompt the user to provide an email
Code
Not sure?
Tool Workflow
AI Agent
Agent