Slack Integration
Bring Codmir into your Slack workspace for AI-powered workflow: create tickets, run analyses, and manage automation directly from channels.
Prerequisites
- A Slack workspace where you can install apps
- Codmir app running (local or deployed)
Install the Slack app
- Visit Codmir → Integrations → Slack or open:
/integrations/slack/install. - Click Add to Slack and authorize the app for your workspace.
- On success you will be redirected to
/integrations/slack/installed.
Tip: You can deep-link from marketing to the installer at
/integrations/slack/install.
Install via button
Slack app configuration
Set these in your Slack App at api.slack.com/apps → Your App → OAuth & Permissions.
Redirect URLs
Development
http://localhost:3000/api/integrations/slack/oauth/callbackStaging
https://staging.codmir.com/api/integrations/slack/oauth/callbackProduction
https://codmir.com/api/integrations/slack/oauth/callbackBot token scopes
Add the following scopes:
app_mentions:readassistant:writecanvases:readchannels:historychannels:joinchannels:readchat:writechat:write.publiccommandsconversations.connect:readfiles:readim:historyincoming-webhookreactions:writeusers:readusers:read.email
Environment variables
Add to your .env (values from your Slack app → Basic Information and OAuth & Permissions):
# Slack Bot Configuration
SLACK_BOT_TOKEN="xoxb-your-bot-token"
SLACK_SIGNING_SECRET="your-signing-secret"
SLACK_CLIENT_ID="9565766977975.9608711411952"
SLACK_CLIENT_SECRET="your-client-secret"
# Slack OAuth Install URL (example)
NEXT_PUBLIC_INSTALL_CODMIR_SLACK_APP_URL="https://slack.com/oauth/v2/authorize?client_id=YOUR_CLIENT_ID&scope=...&user_scope="How it works
- Installer UI:
/integrations/slack/install - OAuth callback:
/api/integrations/slack/oauth/callback - Success page:
/integrations/slack/installed
The callback exchanges the authorization code, stores tokens and workspace metadata in the Integration model, and redirects to the success page.
Using the bot
Mention @codmir or DM the bot:
Link channel to project
@codmir link [project-id]Analyze an issue
@codmir analyse Login page not responsive on mobileFull automation
@codmir fix Button alignment broken in checkout flowCreate a ticket
@codmir create Add dark mode supportCheck status
@codmir status #42Trigger PR review
@codmir review 123Troubleshooting
- Invalid redirect_uri: Make sure the redirect URL matches exactly in Slack settings (no trailing slash differences) and uses HTTPS in production.
- Missing required scopes: Add scopes above and reinstall the app to grant new permissions.
- Bot not responding: Verify
SLACK_BOT_TOKEN, add the bot to the channel, and ensure event subscriptions/webhooks are reachable.