This automation workflow triggers a LangChain-based AI agent upon receiving direct messages in Slack. The assistant retrieves conversation history from PostgreSQL, displays a ´thinking´ status during processing, and replies within the same message thread. Ideal for teams needing an intelligent, context-aware assistant inside Slack.
## Who it´s for
- Teams using Slack for internal communication and needing an AI assistant
- Customer support teams using Slack with persistent conversation context
- Developers integrating memory-equipped assistants into chat workflows
- Project managers automating routine queries in Slack
## What the automation does
- Listens to direct messages in Slack, filtering out bot activity
- Triggers a LangChain agent using OpenRouter as the LLM provider
- Retrieves prior conversation history from PostgreSQL to maintain context
- Sets a ´typing´ indicator via Slack API before processing begins
- Sends formatted Markdown responses back in-thread using Slack Blocks
- Stores new messages and replies in PostgreSQL for future continuity
## What´s included
- Ready-to-use n8n workflow
- Trigger and message handling logic
- Integrations with Slack, PostgreSQL, and OpenRouter
- Basic text guide for setup and adaptation
## Requirements for setup
- n8n instance (cloud or self-hosted)
- Slack workspace access with bot creation permissions
- Configured PostgreSQL database
- OpenRouter API key
- Slack bot token with required scopes (chat:write, chat:write.public, users:read)
## Benefits and outcomes
- Faster responses to common internal questions
- Persistent dialogue context across sessions
- Professional bot behavior with typing indicators
- Reduced employee workload by automating repetitive tasks
- Scalability to other channels via similar templates
- Centralized storage of interaction history in PostgreSQL
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via Telegram: @gleb923.
AI assistant in Slack
Slack bot with memory
respond to Slack DMs
conversation history storage
PostgreSQL context storage
LangChain agent
n8n workflow automation
Markdown formatting in Slack
typing status in Slack
bot message filtering
context-aware support
Slack messaging automation
Slack direct message bot
threaded responses in Slack
OpenRouter LLM
No feedback yet