AutomationMart
Home/Browse/Create a Slack AI chatbot with threads & thinking UI using OpenRouter & Postgres
n8n

Create a Slack AI chatbot with threads & thinking UI using OpenRouter & Postgres

n8nn8n8 modulesv1.0
agenthttpRequestiflmChatOpenRoutermemoryPostgresChatnoOpslackslackTrigger

Overview Slack quietly released an update to their API that allows developers to build "AI Apps & Agents", which is a special classification of apps that have access to several special capabilities including: - Multiple simultaneous chat threads with one user - Loading "three dots" UI while your agent is thinking - Option for users to pin your app to their top bar for quick chat access This workflow demonstrates how to build a Slack agent that takes advantage of all of these features. For

At a glance

Create a Slack AI chatbot with threads & thinking UI using OpenRouter & Postgres is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects agent, httpRequest, if, lmChatOpenRouter. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
agent, httpRequest, if, lmChatOpenRouter, memoryPostgresChat, noOp
Modules
8
Price
Free
Version
v1.0
Create a Slack AI chatbot with threads & thinking UI using OpenRouter & Postgres workflow diagram

About this workflow

Overview Slack quietly released an update to their API that allows developers to build "AI Apps & Agents", which is a special classification of apps that have access to several special capabilities including: - Multiple simultaneous chat threads with one user - Loading "three dots" UI while your agent is thinking - Option for users to pin your app to their top bar for quick chat access This workflow demonstrates how to build a Slack agent that takes advantage of all of these features. For a full video walkthrough of this workflow, watch this YouTube tutorial. Setup Instructions All of the below steps are required for this workflow to function properly unless otherwise noted. Create a Slack App 1. Visit api.slack.com and click "Your Apps" 2. Create a new app from scratch and follow the setup instructions 3. In the Agents & AI Apps tab, enable the toggle and give your app a brief description 4. In the OAuth & Permissions tab, enable the following bot token scopes: 1. assistant:write 2. chat:write 3. channels:read 4. im:history 5. Install the app into your workspace and grant the requested permissions 6. In your Slack workspace, right click your app's name in the sidebar, click "View app details", and make note of your apps Channel ID - you'll need this later. 7. Copy your app's Bot User OAuth Token - you'll need that to create your n8n credentials 8. In the Event Subscriptions tab, enable events and paste the workflows PRODUCTION webhook url (from this workflow's trigger node) into the input. 9. In the same tab under "Susbcribe to bot events", select message.im Create a Postgres database In order to save the chat history and give your agent a working memory, you'll need your own Postgres database. You can use Supabase, Neon, or any other Postgres database provider. Once you've added your database's credentials to n8n, you can select those credentials in the Postgres Chat Memory node. This worklow saves all chat history in a table called chathistories, but you name the table whatever you want. Create n8n Credentials You'll need to create the following credentials: 1. Slack API. Use your Bot User OAuth Token referenced above. 2. Bearer Auth. Use the same Bot User OAuth Token. 3. Postgres. Use the connection string or config from your database provider. 4. OpenRouter (or any other LLM model for the agent's model node) Wire Everything Up Now that you've created your Slack app, have your Postgres database, and have created credentials, follow these steps to wire up your workflow: 1. In the "On Message Received" trigger, use your Slack API credential and enter your apps Channel ID in the "Channel To Watch" field. 2. In the "Set Thinking Status" node, use your Bearer Auth credential. 3. In the "Postgres Chat Memory" node, use your Postgres credential. 4. In the "Send Reply" node, use your Slack API credential. Using the Chatbot Once you've completed the setup process and added in your credentials, you'll have a fully functional Slack chatbot complete with threads, loading UI, and the ability to pin your app to your workspace's top bar. Taking the Next Steps Now that this skeleton app is in place, it's up to you to add horsepower to the AI agent at the center of it all. Customize the prompts and add whatever tools you'd like. The sky is the limit! If you have any questions or feedback about this workflow, or would like me to build custom workflows for your business, email me at n8n@paperjam.agency.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

B2B lead qualification

This automated n8n workflow qualifies B2B leads via voice calls using the VAPI API and integrates the collected data into Google Sheets. It triggers when a new lead’s phone number is added, streamlining lead qualification and data capture. What is VAPI? VAPI is an API service that enables voice call automation, used here to qualify leads by capturing structured data through interactive calls. Good to Know - VAPI API calls may incur costs based on usage; check VAPI pricing for details. - Ensure G

Free

Daily startup intelligence: Crunchbase updates to email digest with GPT

Automated Startup Intelligence: CrunchBase Updates to Email Digest Workflow! Workflow Overview This cutting-edge n8n automation is a sophisticated startup intelligence tool designed to transform market research into actionable insights. By intelligently connecting CrunchBase, AI processing, and Gmail, this workflow: 1. Discovers Startup Updates: - Automatically retrieves latest company information - Tracks recent organizational changes - Eliminates manual market research efforts 2. Intellige

Free

Track expenses from Telegram to Google Sheets with GPT-4.1 Mini

Telegram Expense Tracker to Google Sheets with GPT-4.1 .jpg) > A lightweight automation that lets users log daily expenses via a Telegram bot and instantly saves them into Google Sheets—perfect for anyone looking to manage spending on the go with AI-powered structure and ease. 👤 Who’s it for This workflow is for anyone who wants to log their daily expenses by simply chatting with a Telegram bot. Ideal for: - Individuals who want a quick way to track spending - Freelancers who log receipts and

Free

Send messages to Slack from a custom webhook

Automatically send messages to Slack using a custom webhook. Trigger messages with Custom WebHook and create them with Slack's Create Message modules.

Free

Track SEO keyword rankings with Bright Data MCP and GPT-5.2 AI analysis

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. This workflow automatically monitors keyword rankings across search engines to track SEO performance and identify optimization opportunities. It saves you time by eliminating the need to manually check keyword positions and provides comprehensive ranking data for strategic SEO decision making. Overview This workflow automatically scrapes search engine results pages (SERPs) to track keywor

Free

AI-powered WhatsApp support bot with ticket creation for Google Sheets

This n8n workflow automates the entire process, from learning based on your website data, documents to a multi-channel chatbot with automated ticket creation. It's the perfect solution for businesses looking to build a powerful and intelligent chatbot, replace their customer support operations team with a website widget support and a dedicated WhatsApp support agent. How it Works 1. Data Ingestion & Vectorization: The workflow starts with a simple form where you can input your website's sitemap

Free

🛠️ Microsoft OneDrive tool MCP server 💪 all 14 operations

Need help? Want access to this workflow + many more paid workflows + live Q&A sessions with a top verified n8n creator? Join the community Complete MCP server exposing all Microsoft OneDrive Tool operations to AI agents. Zero configuration needed - all 14 operations pre-built. ⚡ Quick Setup 1. Import this workflow into your n8n instance 2. Activate the workflow to start your MCP server 3. Copy the webhook URL from the MCP trigger node 4. Connect AI agents using the MCP URL 🔧 How it Works • MCP T

Free

Automate sleep meditation content creation with ElevenLabs V3 & DeepSeek AI

Need help? Want access to this workflow + many more paid workflows + live Q&A sessions with a top verified n8n creator? Join the community Automate the production of ad-friendly meditation content—from trend research to AI voiceover generation. 🌟 Key Features Style-Specific Content Generation Input a meditation style (e.g., "calming," "motivational") and generate tailored scripts. Customize voice profiles using ElevenLabs. Trend-Based Title Research Scrape YouTube/Brave Search for popular v

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free