I've built a complete Slack messaging app for OMI with the following features:
- Voice-activated Slack messaging - Say "Send message to [channel] saying [message]"
- AI-powered channel matching - Fuzzy matches spoken channel names to your workspace
- Smart message extraction - Cleans up filler words and formats messages
- OAuth 2.0 integration - Secure Slack workspace authentication
- Mobile-first UI - Beautiful Slack-themed interface
- Channel management - Set default channel or specify in voice
slack/
├── main.py # FastAPI app with all endpoints
├── slack_client.py # Slack API integration
├── message_detector.py # AI channel matching & message extraction
├── simple_storage.py # File-based storage
├── requirements.txt # Python dependencies
├── .env.example # Environment template
├── .gitignore # Git ignore rules
├── README.md # Full documentation
├── LICENSE # MIT License
├── Procfile # Deployment config
├── railway.toml # Railway config
└── runtime.txt # Python version
The git repository is initialized and committed, but needs your credentials to push:
cd /Users/aaravgarg/omi-ai/Code/apps/slack
git push -u origin mainIf you need to authenticate, you can use:
- Personal Access Token (recommended)
- SSH key
- GitHub CLI (
gh auth login)
- Go to https://api.slack.com/apps
- Click "Create New App" → "From scratch"
- Enter name: "OMI Voice Messenger" (or your choice)
- Select your workspace
- Navigate to OAuth & Permissions
- Add these Scopes:
channels:read- View public channelschat:write- Send messagesgroups:read- View private channelsusers:read- View user info
- Add Redirect URL:
http://localhost:8000/auth/callback(for local testing) - Copy Client ID and Client Secret
cd /Users/aaravgarg/omi-ai/Code/apps/slack
cp .env.example .envEdit .env with your credentials:
SLACK_CLIENT_ID=your_client_id_here
SLACK_CLIENT_SECRET=your_client_secret_here
OPENAI_API_KEY=your_openai_key_here
OAUTH_REDIRECT_URL=http://localhost:8000/auth/callback
APP_HOST=0.0.0.0
APP_PORT=8000# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtpython main.pyThen visit:
- Test Interface: http://localhost:8000/test?dev=true
- Homepage: http://localhost:8000/?uid=test123
- Push to GitHub (step 1 above)
- Go to https://railway.app
- Click "New Project" → "Deploy from GitHub"
- Select
omi-slack-apprepository - Add environment variables (from
.env) - Get your Railway URL (e.g.,
your-app.up.railway.app) - Update in Slack app settings:
- Redirect URL:
https://your-app.up.railway.app/auth/callback
- Redirect URL:
In your OMI app settings, use:
- Webhook URL:
https://your-app.up.railway.app/webhook - App Home URL:
https://your-app.up.railway.app/ - Auth URL:
https://your-app.up.railway.app/auth - Setup Check URL:
https://your-app.up.railway.app/setup-completed
With channel specified:
"Send message to general saying hello team!"
"Post in marketing that the campaign is live"
"Slack message to random saying great idea!"
Using default channel:
"Send message saying quick update for everyone"
- Trigger detected - "Send message to [channel]"
- Collect 3 segments - (~10-15 seconds of speech)
- AI extracts:
- Channel name (fuzzy matched)
- Message content (cleaned)
- Post to Slack - Message sent!
- Notification - "✅ Message sent to #general: [message]"
AI intelligently matches spoken channel names:
- "general" → #general ✅
- "the marketing channel" → #marketing ✅
- "random stuff" → #random ✅
- Handles pronunciation variations
- Fuzzy matching for imperfect transcriptions
- Removes filler words (um, uh, like)
- Fixes grammar and capitalization
- Formats professionally
- Preserves meaning and tone
Similar to GitHub/Twitter apps but customized for Slack:
Voice Input (OMI)
↓
Webhook Endpoint (/webhook)
↓
Trigger Detection ("Send message")
↓
Segment Collection (3 segments)
↓
AI Processing:
- Extract channel name
- Extract message content
- Match to workspace channels
↓
Slack API (Post Message)
↓
User Notification ✅
- Channel Selection - User can specify channel in voice OR use default
- AI Channel Matching - Fuzzy matches spoken names to workspace channels
- Dual Mode - Works with or without default channel set
- 3 Segments - Balanced for channel + message extraction
- Slack OAuth - Different from GitHub/Twitter OAuth flow
- Real-time Channels - Fetches and updates channel list dynamically
- Framework: FastAPI
- AI: OpenAI GPT-4o for channel matching & extraction
- Storage: File-based with Railway persistence (
/app/data) - OAuth: Slack OAuth 2.0
- Deployment: Railway (recommended)
- Python: 3.10.17
→ Click "Refresh Channels" in settings → Speak channel name more clearly → Set as default channel
→ Visit homepage and select a default → OR always specify channel in voice
→ Verify Slack app credentials → Check redirect URL matches exactly → Ensure all required scopes are added
- Smart Channel Detection - No need to perfectly pronounce channel names
- Flexible Usage - Works with or without defaults
- Voice-First - Designed specifically for voice interaction
- AI-Powered - Intelligent extraction and formatting
- Production-Ready - Full error handling and logging
The app is complete and ready to use. Just:
- Push to GitHub (with your credentials)
- Set up Slack app
- Configure environment
- Run locally or deploy to Railway
- Connect to OMI
Happy voice messaging! 💬✨