Query Slack Channel History with Natural Language using OpenAI
Chat with a Slack channel using AI. This workflow fetches the channel’s message history and lets you ask natural-language questions (“what were the decisions?”, “who’s blocked?”, “summarize yesterday”). The assistant only answers from the channel’s actual messages—no guessing.
⚙️ Setup Instructions
1️⃣ Set Up OpenAI Connection
Go to OpenAI Platform
Navigate to OpenAI Billing
Add funds to your billing account
Copy your API key into the OpenAI credentials in n8n
2️⃣ Connect Slack API
Create an app → <https://api.slack.com/apps>
OAuth & Permissions → add scopes you need to read channel history (typical:
channels:history, groups:history, im:history, mpim:history, plus channels:read, groups:read, users:read. Add chat:write if you want the bot to reply in Slack.)
Install the app to your workspace → copy the Bot User OAuth Token
In n8n → Credentials → New → Slack OAuth2 API → paste token and save
In the Slack History node, select your Slack credential and the Channel ID to read
🗣️ Example Questions You Can Ask
“Give me a 5-bullet summary of the last 24 hours.”
“What action items were assigned, and to whom?”
“List open questions that haven’t been answered yet.”
“Who was mentioned most this week?”
“Summarize decisions from the last sprint planning.”
“Show messages with the word ‘blocker’ from the past 2 days.”
“What files/links were shared today?”
📬 Contact Need help customizing this or adding auto-replies back into Slack?
📧 robert@ynteractive.com
🔗 Robert Breen
🌐 ynteractive.com
Related Templates
Reply to Outlook Emails with OpenAI
Who is this template for? This template is for any Microsoft Outlook user who wants a trained AI agent to reason and rep...
Use OpenRouter in n8n versions <1.78
What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot...
Task Deadline Reminders with Google Sheets, ChatGPT, and Gmail
Intro This template is for project managers, team leads, or anyone who wants to automatically remind teammates of tasks ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments