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

  1. The Slack app install page is not available on this site yet. Until it is, use the install button below, or the installer in the Codmir app once it ships here.
  2. Click Add to Slack and authorize the app for your workspace.
  3. On success you will be redirected to /integrations/slack/installed.

Note: A hosted installer page is not available on this site yet, so there is nothing to deep-link to from marketing pages.

Install via button

Add to Slack

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/v1/slack/oauth/callback

Staging

https://staging.codmir.com/api/v1/slack/oauth/callback

Production

https://codmir.com/api/v1/slack/oauth/callback

Bot token scopes

Add the following scopes:

  • app_mentions:read
  • assistant:write
  • canvases:read
  • channels:history
  • channels:join
  • channels:read
  • chat:write
  • chat:write.public
  • commands
  • conversations.connect:read
  • files:read
  • im:history
  • incoming-webhook
  • reactions:write
  • users:read
  • users: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/v1/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 mobile

Full automation

@codmir fix Button alignment broken in checkout flow

Create a ticket

@codmir create Add dark mode support

Check status

@codmir status #42

Trigger PR review

@codmir review 123

Troubleshooting

  • 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.