A Python-based Slack app that automatically sends tagged messages to multiple Airtable bases when users react with specific emojis, with intelligent routing and pain score classification.
Slacktable monitors Slack channels for specific emoji reactions and automatically creates records in your Airtable table with the message content and metadata. Perfect for quickly collecting bug reports, feature requests, or any important messages from your team conversations with built-in priority classification.
- 🚚 React with
:fedex:emoji to tag messages (legacy support) - 🔢 Use
:one:,:two:,:three:emojis to tag messages with Pain Score classification - 🪵 React with
:changelog:emoji to route messages to separate Changelog table - 📊 Pain Score Support: Automatically categorizes issues by severity
:one:→ Small (sm) pain score:two:→ Medium (md) pain score:three:→ Large (lg) pain score
- 🗂️ Multi-Base Routing: Different emojis can route to different Airtable bases
- 🖼️ Image Support: Automatically captures up to 3 images per message
- 🧵 Works on both main messages and threaded replies
- 📝 Automatically extracts message text
- 🗃️ Creates records in Airtable table with Status = "Intake"
- 🔒 Secure token management via environment variables
- 📊 Comprehensive logging and error handling
- ⚡ Real-time Socket Mode connection to Slack
- 🚀 Easy deployment to Fly.io
-
Clone the repository
git clone https://github.com/Casey-00/Slacktable.git cd Slacktable -
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env with your tokens (see Configuration section) -
Run locally with Socket Mode
python run_socket_mode.py
Create a .env file with the following variables:
# Slack App Tokens
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_APP_TOKEN=xapp-your-app-token
# Airtable Configuration
AIRTABLE_API_TOKEN=your-airtable-token
AIRTABLE_BASE_ID=your-base-id-here
AIRTABLE_TABLE_NAME=your-table-name
AIRTABLE_FIELD_NAME=your-field-name
# App Configuration
# (No app-specific configuration is needed anymore as emoji mapping is in the code)Note: Socket Mode doesn't require SLACK_SIGNING_SECRET - only the Bot Token and App-Level Token are needed.
This app is designed to run on Fly.io which supports persistent connections required for Socket Mode.
For detailed deployment instructions, see docs/deployment.md.
- Install Fly.io CLI and authenticate
- Initialize your app:
flyctl launch - Set secrets: Use
flyctl secrets setfor all environment variables - Deploy:
flyctl deploy
Slacktable/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI application (legacy)
│ ├── socket_mode.py # Socket Mode handler
│ ├── config.py # Configuration and environment variables
│ ├── slack/
│ │ ├── __init__.py
│ │ ├── client.py # Slack client initialization
│ │ └── handlers.py # Event handlers for reactions
│ ├── airtable/
│ │ ├── __init__.py
│ │ └── client.py # Airtable client and operations
│ └── utils/
│ ├── __init__.py
│ └── logging.py # Logging configuration
├── docs/
│ ├── slack-app-setup.md # Slack app configuration guide
│ ├── airtable-setup.md # Airtable setup instructions
│ └── deployment.md # Deployment guide
├── tests/
│ └── test_handlers.py # Unit tests
├── requirements.txt # Python dependencies
├── run_socket_mode.py # Socket Mode runner script
├── .env.example # Environment variables template
└── README.md # This file
- User tags a message by reacting with one of the supported emojis:
:fedex:- Creates record without pain score (legacy):one:- Creates record with Pain Score = "sm" (small):two:- Creates record with Pain Score = "md" (medium):three:- Creates record with Pain Score = "lg" (large):changelog:- Routes to separate Changelog base without pain score
- Slack sends event to your app via Socket Mode connection
- App processes the reaction and extracts the original message
- Images are captured automatically (up to 3 per message)
- Record created in Airtable with:
- Message text in your configured field
- Status = "Intake"
- Pain Score (if applicable)
- Image URLs in "Slack Screenshot", "Slack Screenshot 2", "Slack Screenshot 3" fields
- Success/error logged for monitoring
- Slack App Setup - Step-by-step Slack app configuration
- Airtable Setup - Airtable API token and base setup
- Deployment Guide - Fly.io deployment instructions
pytest tests/This project follows PEP 8 guidelines. Format code with:
black app/Logs are structured and include:
- Timestamp
- Log level
- Message
- Relevant context (user, channel, etc.)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
For issues or questions:
- Check the docs directory
- Search existing GitHub issues
- Create a new issue if needed
Note: This app requires proper Slack app permissions and Airtable API access. See the setup guides in the docs/ directory for detailed instructions.