Skip to content

ortima/slack-activity-bot

 
 

Repository files navigation

Slack Activity Tracker Bot

Overview

The Slack Activity Tracker Bot is a bot built with Slack's API and Express.js (using TypeScript). It allows you to track user activity in different Slack channels and send notifications when a user has been inactive for a specified period of time.

The bot provides the following main features:

  • Start and stop tracking user activity in a specific Slack channel.
  • Send reminders if a user has been inactive for a given time period.
  • Support for tracking the same user across multiple channels simultaneously.

Features

  • /track [username] [time_in_minutes]: Start tracking a user's activity. The bot will notify the channel if the user remains inactive for the specified time.
  • /stop [username]: Stop tracking the specified user in the current channel.
  • Multi-channel support for the same user.
  • Simple session management using in-memory storage for active sessions.
  • Error handling for failed API calls, invalid commands, and missing user data.

Setup Instructions

Prerequisites

  • Node.js (version 14 or above)
  • npm (Node package manager)
  • A Slack workspace with a bot application set up
  • Slack Bot Token and Signing Secret

Installation

  1. Clone the repository:
git clone https://github.com/your-repository-url.git

cd your-repository
  1. Install the required dependencies:
npm install
  1. Set up environment variables in .env file:
SLACK_BOT_TOKEN=your-slack-bot-token

SLACK_SIGNING_SECRET=your-slack-signing-secret

SLACK_APP_TOKEN = your-slack-app-token

PORT = your_port

  1. Start bot in dev
npm run start:dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.1%
  • JavaScript 3.9%