Incident Bot is a Slack + Notion integration designed to simplify how Appunite logs, tracks, and resolves service-related incidents.
Enable users to create incidents directly from Slack via /incident, automatically syncing with the Notion Incidents database.
/incidentcommand opens a Slack modal for structured reporting.- Data automatically pushed to Notion database.
- Thread message in Slack confirming creation.
- Two-way sync: status/owner updates in Notion reflect back to Slack thread.
- Daily reminders for incidents without owner.
- Node.js + TypeScript
- Slack Bolt SDK
- Notion API
- Express server
- Deployed on Railway (see DEPLOYMENT.md)
src/slack/→ Slack handlers (commands, modals, events)src/notion/→ Notion API clients and helperssrc/utils/→ logging, error handlingdocs/→ architecture & behavior documentation
| Variable | Description |
|---|---|
SLACK_BOT_TOKEN |
OAuth token from Slack app |
SLACK_SIGNING_SECRET |
Secret from Slack app |
NOTION_TOKEN |
Notion integration token |
NOTION_DB_ID |
ID of the Incidents database |
PORT |
Local port for dev (default 3000) |
- Node.js >= 18.0.0
- npm or yarn
- Slack workspace with admin access
- Notion workspace with admin access
- Install dependencies
npm install- Set up environment variables
cp .env.example .envThen edit .env with your credentials (see next section)
- Run the development server
npm run devThe server will start on http://localhost:3000
You need to configure both Slack and Notion integrations before the bot will work.
- Go to https://api.slack.com/apps
- Click "Create New App" → "From scratch"
- Name:
Incident Bot, select your workspace - Go to OAuth & Permissions:
- Add Bot Token Scopes:
chat:write- Post messagescommands- Use slash commandsusers:read- Read user infochannels:read- Read channel info
- Click "Install to Workspace"
- Copy Bot User OAuth Token →
SLACK_BOT_TOKENin.env
- Add Bot Token Scopes:
- Go to Basic Information:
- Copy Signing Secret →
SLACK_SIGNING_SECRETin.env
- Copy Signing Secret →
- Go to https://www.notion.so/my-integrations
- Click "New integration"
- Name:
Incident Bot, select workspace - Copy Internal Integration Token →
NOTION_TOKENin.env - Create a new database in Notion called "Incidents"
- Share the database with your integration (click "Share" → find your integration)
- Copy database ID from URL:
- URL format:
https://www.notion.so/{workspace}/{DATABASE_ID}?v=... - Copy
DATABASE_ID→NOTION_DB_IDin.env
- URL format:
Add these properties to your "Incidents" database:
| Property Name | Type | Options |
|---|---|---|
| Title | Title | (default) |
| Description | Rich Text | - |
| Status | Select | New, In Progress, Resolved, Closed |
| Severity | Select | Critical, High, Medium, Low |
| Area | Select | Client Communication, Internal Process, Technical, Other |
| Owner | Person | - |
| Accountable | Person | - |
| Created At | Date | - |
| Created By | Rich Text | - |
| Created From | Select | Slack, Manual |
| Slack Thread URL | URL | - |
| Slack Channel ID | Rich Text | - |
| Slack Message TS | Rich Text | - |
- Start the server:
npm run dev - Visit http://localhost:3000/health
- You should see:
{"status":"healthy","slack":{"connected":true},"notion":{"connected":true}}
If you see errors, check your .env configuration.
After setup is complete, see docs/TODO.md for the development roadmap.
Sprint 1 will implement the /incident command and basic incident creation flow.
# Install dependencies
npm install
# Run development server with hot reload
npm run dev
# Build for production
npm run build
# Run production build
npm start
# Lint code
npm run lint