Optimizing Daily Work Conversations: The Ultimate Guide To Building A Slack AI Bot

May 12, 2025

about 4 min read

services-header-img

Discover how to build a Slack bot in just 8 steps!

According to Business of Apps, Slack attracted 42 million active users worldwide in 2024, and Golden Owl Solutions is one of them. But with just a few hours offline, our colleagues are overwhelmed with a flood of threads and key decisions scattered across channels. This challenge motivated our AI team to develop a solution: an AI bot that collects, summarizes messages, and sends a daily digest to your chosen channel.

In this blog post, we’ll guide you through the process of building your own Slack AI bot. You’ll get step-by-step instructions and practical uses of this tool, which will save your time, reduce confusion, and boost productivity.

 

Applications of Slack AI Bot

What This Bot Does:

✅ Collects messages from one or more Slack channels. 

✅ Summarizes the conversations using an AI model. 

✅ Posts the summary to a Slack channel.

✅ Runs daily on a schedule (e.g., from Monday to Friday at 5:30 PM).

 

What You Need To Build The Bot

 

1 The Right Tech Stack

We use different kinds of tech stacks to create the Bot:

ComponentDescription
Slack APITo fetch and post messages
PythonCore development language
AI ModelGemini by Google (you can use ChatGPT, etc.)
SchedulerCronjob for daily automatio

2 Slack App: What is it?

A Slack App is a custom integration to extend Slack’s capabilities. With the personalization function, this Slack bot or automation tool can read messages, post replies, react with emojis, and more. It gives users API access to things like:

  • Reading messages from channels
  • Posting summaries back into Slack, interacting with users or listening to events

 

Step-By-Step Instructions: Build The Bot

 

Step 1: Create a Slack App

Go to https://api.slack.com/apps -> click “Create New App” -> choose one of two choices:

1.1 From scratch (Recommended for beginners): Creating the app manually

  • Set an app name. 
  • Choose the Slack workspace it will be installed
Steps to create Slack AI chatbot
  • Add features one by one (e.g., permissions, bot scopes, event subscriptions). After creating it, continue to the next section to configure the required permissions.

 

1.2 From a manifest (For advanced users): Creating the app manually

A manifest is a YAML or JSON file that defines the entire app configuration in one place. You can specify all settings and details upfront:

Steps to create Slack AI chatbot

Step 2: Config your Slack App

Go to OAuth & Permissions, add these bot scopes:

  • chat:write
  • users:read
  • channels:history
  • groups:history
Steps to create Slack AI chatbot

 

Then install the app in your workspace:

Steps to create Slack AI chatbot

 

 

Step 3: Fetch Messages from one Channel

Here's a basic Python function to fetch the past 24 hours of messages:

Steps to create Slack AI chatbot

However, this isn't enough, as conversations_history only returns the main messages in the channel, not the threaded replies. To get the full conversation, you'll need to fetch thread replies separately:

Steps to create Slack AI chatbot

 

Step 4: Fetch Messages from Multiple Channels

To create separate summaries for each channel in your workspace, you need to access all channels and process them individually.

Steps to create Slack AI chatbot

Step 5: Summarizing with Gemini

Apply a two-phase approach in the summarization process.

Phase 1:  Topic Detection - Analyzing the conversation thread to identify key topics

Phase 2: Focused Summarization - Generating summaries based on those topics

 

This approach has several advantages:

  • Delivering readers with a clearer, more structured summary
  • Preventing information overload in the final digest
  • Reducing "noise" by focusing only on relevant content in the model's input
  • Improving the quality of summarization by breaking complex conversations into manageable topics.

 

Steps to create Slack AI chatbot
Implementing the process using Google’s Gemini model

Step 6: Link Topics to Original Messages

One limitation of basic summaries is that they don't allow users access to the original conversations. To address this, we embed direct links to the original Slack threads within the summaries. 

Here’s the approach:

1. For each detected topic, identify the original messages

2. Create Slack permalinks to those messages

3. Embed the links within our summary

 

This allows users to easily click through from the summary to the relevant conversation whenever they need more context.

 

This implementation gives each topic in your summary a "View Thread" link that takes users directly to the relevant conversation.

Steps to create Slack AI chatbot
Steps to create Slack AI chatbot

Step 7: Post Summary to Slack

After having nicely formatted the summary, we need to post it to Slack

[Insert photo]

Here is the code patch to implement it

Steps to create Slack AI chatbot

 

Step 8: Automate it

To make your bot run daily without manual intervention, set up a cronjob on your server:

8.1. Create a wrapper script

Create a simple bash script run_bot.sh that will execute your Python code:

Steps to create Slack AI chatbot

8.2. Set up the cronjob

Open your crontab file for editing:

Steps to create Slack AI chatbotst

Add a line to run your script at a specific time (e.g., 5:30 PM from Monday to Friday):

Steps to create Slack AI chatbot

 

Now your Slack summary bot will automatically run Monday to Friday, delivering daily summaries without any manual intervention!

 

Real-World Application of Slack AI chatbot

After deploying this bot internally, our team at Golden Owl Solutions saw instant improvements in communication efficiency:

✅ Less time spent catching up on Slack

✅ Faster awareness of team decisions

✅ Everyone stays aligned without feeling overwhelmed

 

The bot effectively identified key topics in our channels, provided concise summaries of decisions, and included links back to the original conversations. 

Real-World Application of Slack AI chatbot

 

This isn’t just a productivity hack. It’s a smart, AI-powered assistant that helps your team focus on what matters, without losing sight of important conversations. If you manage a remote or hybrid team, this solution can dramatically streamline communication.

 

Final Thoughts

This AI-powered bot is not only a handy productivity tool but also a smarter way to help your team focus on what matters, without missing out on key conversations. This solution can simplify operations and manage your team more effectively.

Thinking of building a smart bot like this for your business? Golden Owl Solutions is here to help. We provide top-notch AI solutions that elevate your business and give you a decisive advantage over your competitors.

liner

Our latest posts

latest-postArtificial Intelligence

Optimizing Daily Work Conversations: The Ultimate Guide To Building A Slack AI Bot

Discover how to build a Slack bot in just 8 steps!

May 12, 2025

about 4 min read

latest-postWeb Development

Web Application Architecture Explained for Modern Developers and Digital Business (2025)

A complete guide to web application architecture: frontend, backend, database, middleware, and how they work together.

May 12, 2025

about 12 min read

latest-postIT Consulting

Types of Software: Definitions, Examples, and How to Choose the Best One (2025)

Explore the main types of software in 2025, with definitions, real-world examples, and expert advice on how to choose the right software for business or personal use.

May 8, 2025

about 8 min read

dialog

Subscribe to Golden Owl blog

Stay up to date! Get all the latest posts delivered straight to your inbox
messenger icon