Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CaputoDavide93/ITSD-Reminder

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– ITSD Reminder Bot

Automated Slack bot for IT Service Desk ticket category reminders

A Slack bot that monitors your IT Service Desk channel and automatically reminds users to select a category for their tickets when they forget to do so.

Python Docker Slack License


Features β€’ Quick Start β€’ Configuration β€’ Contributing


✨ Features

Feature Description
πŸ” Automatic Monitoring Continuously monitors your Slack channel for new tickets
⏰ Smart Timing Only reminds users after a configurable time threshold
πŸ€– HelpDesk Integration Detects when HelpDesk bot has already processed a ticket
πŸ”„ Duplicate Prevention Tracks reminded messages to avoid spamming users
🐳 Docker Ready Fully containerized with multi-architecture support (Intel & Apple Silicon)
πŸ”’ Secure Runs as non-root user, credentials via environment variables

πŸš€ Quick Start

# Clone the repository
git clone https://github.com/CaputoDavide93/ITSD-Reminder.git
cd ITSD-Reminder

# Configure environment
cp config/.env.example config/.env
nano config/.env  # Add your Slack credentials

# Run with Docker
docker compose up -d

πŸ“¦ Prerequisites

For Docker Deployment (Recommended)

Requirement Version
🐳 Docker 20.10+
πŸ“¦ Docker Compose 2.0+

For Local Development

Requirement Version
🐍 Python 3.9+
πŸ“¦ pip Latest

Slack Bot Setup

πŸ“‹ Step-by-Step Guide

Step 1: Create a Slack App

  1. Go to api.slack.com/apps
  2. Click "Create New App" β†’ "From scratch"
  3. Enter an App Name (e.g., "ITSD Reminder Bot")
  4. Select your workspace and click "Create App"

Step 2: Configure Bot Permissions

  1. Navigate to "OAuth & Permissions"
  2. Add these Bot Token Scopes:
Scope Purpose
channels:history Read messages from public channels
channels:read View basic channel info
chat:write Send reminder messages
users:read Get user information for mentions

Step 3: Install the App

  1. Click "Install to Workspace"
  2. Review permissions and click "Allow"
  3. Copy the Bot User OAuth Token (starts with xoxb-)

Step 4: Invite Bot to Channel

  1. Open your IT Service Desk channel in Slack
  2. Type /invite @YourBotName

βš™οΈ Configuration

Environment Variables

Variable Required Default Description
SLACK_BOT_TOKEN βœ… - Your Slack Bot OAuth Token
CHANNEL_ID βœ… - The Slack channel ID to monitor
HELPDESK_BOT_ID βœ… - The HelpDesk bot's ID
AGE_THRESHOLD_SECONDS ❌ 10800 Time to wait before sending reminder (3 hours)
CHECK_INTERVAL_HOURS ❌ 2 How often to check for new messages

Example Configuration

# config/.env
SLACK_BOT_TOKEN=xoxb-your-token-here
CHANNEL_ID=C0XXXXXXXXX
HELPDESK_BOT_ID=B0XXXXXXXXX
AGE_THRESHOLD_SECONDS=10800
CHECK_INTERVAL_HOURS=2

⚠️ Security Note: Never commit your .env file to version control!


🐳 Docker Deployment

Multi-Architecture Support

This image supports both Intel/AMD64 and Apple Silicon (ARM64).

Build and Run

# Build and start
docker compose up -d

# View logs
docker compose logs -f

# Stop the service
docker compose down

# Rebuild after code changes
docker compose up -d --build

πŸ’» Running Locally

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set environment variables
export SLACK_BOT_TOKEN="xoxb-your-token"
export CHANNEL_ID="C0XXXXXXXXX"
export HELPDESK_BOT_ID="B0XXXXXXXXX"

# Run the bot
python src/main.py

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    ITSD Reminder Bot                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                             β”‚
β”‚  1. πŸ” Fetches today's messages from the channel           β”‚
β”‚                 ↓                                           β”‚
β”‚  2. ⏰ Filters messages older than threshold                β”‚
β”‚                 ↓                                           β”‚
β”‚  3. πŸ”Ž Checks each thread for HelpDesk bot replies         β”‚
β”‚                 ↓                                           β”‚
β”‚  4. πŸ“¨ Sends reminder to threads without category          β”‚
β”‚                 ↓                                           β”‚
β”‚  5. πŸ’Ύ Logs reminded messages to prevent duplicates        β”‚
β”‚                 ↓                                           β”‚
β”‚  6. 😴 Sleeps for configured interval, then repeats        β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

ITSD-Reminder/
β”œβ”€β”€ πŸ“ src/                    # Source code
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── main.py                # Main bot logic
β”œβ”€β”€ πŸ“ config/                 # Configuration
β”‚   β”œβ”€β”€ .env.example           # Template (safe to commit)
β”‚   └── .env                   # Your secrets (gitignored)
β”œβ”€β”€ πŸ“ data/                   # Runtime data (gitignored)
β”‚   └── reminded_messages.json
β”œβ”€β”€ 🐳 Dockerfile              # Multi-arch Docker image
β”œβ”€β”€ 🐳 docker-compose.yml      # Docker orchestration
β”œβ”€β”€ πŸ“‹ requirements.txt        # Python dependencies
β”œβ”€β”€ πŸ“œ LICENSE                 # MIT License
β”œβ”€β”€ 🀝 CONTRIBUTING.md         # Contribution guidelines
β”œβ”€β”€ πŸ” SECURITY.md             # Security policy
└── πŸ“– README.md               # This file

πŸ”§ Troubleshooting

❌ Bot not responding
  • Check if the bot is running: docker compose ps
  • Verify logs for errors: docker compose logs -f
  • Ensure environment variables are set correctly
❌ "channel_not_found" error
  • Verify the CHANNEL_ID is correct
  • Ensure the bot is invited to the channel: /invite @YourBotName
❌ Messages not being detected
  • Check AGE_THRESHOLD_SECONDS - messages must be older than this value
  • Verify the bot has channels:history permission

🀝 Contributing

Contributions are welcome! Please read our Contributing Guide for details.

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. πŸ’Ύ Commit your changes (git commit -m 'Add amazing feature')
  4. πŸ“€ Push to the branch (git push origin feature/amazing-feature)
  5. πŸ”ƒ Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘€ Author

Davide Caputo

GitHub Email


Made with ❀️ for IT Service Desk teams

About

πŸ€– Slack bot that automatically reminds users to categorize IT Service Desk tickets. Docker-ready with smart duplicate prevention.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.