Skip to main content
The Slack connector allows Humancheck to send rich formatted messages to Slack channels and DMs when reviews are created or decisions are made.

Setup

1. Create Slack App

  1. Go to https://api.slack.com/apps
  2. Click “Create New App”
  3. Choose “From scratch”
  4. Name your app (e.g., “Humancheck”)
  5. Select your workspace

2. Add Bot Token Scopes

  1. Go to “OAuth & Permissions”
  2. Add the following scopes:
    • chat:write - Post messages
    • chat:write.public - Post to public channels without joining

3. Install to Workspace

  1. Click “Install to Workspace”
  2. Authorize the app
  3. Copy the “Bot User OAuth Token” (starts with xoxb-)

4. Configure Connector

from humancheck.connector_manager import ConnectorManager

async with db.session() as session:
    manager = ConnectorManager(session)
    
    # Create Slack connector
    connector = await manager.create_connector(
        connector_type='slack',
        name='Team Slack Workspace',
        config_data={
            'bot_token': 'xoxb-your-bot-token-here'
        }
    )

5. Invite Bot to Channels

In each Slack channel where you want notifications:
/invite @your-bot-name

Creating Routing Rules

# Route SQL reviews to #database-team
await manager.routing_engine.create_rule(
    connector_id=connector.id,
    name="SQL Reviews to DB Team",
    conditions={
        "task_type": "sql_execution",
        "urgency": ["high", "critical"]
    },
    recipients=["#database-team"],
    priority=100
)

# Route critical reviews to #urgent-reviews
await manager.routing_engine.create_rule(
    connector_id=connector.id,
    name="Critical Reviews",
    conditions={
        "urgency": "critical"
    },
    recipients=["#urgent-reviews", "@oncall"],
    priority=200
)

Notification Format

Slack notifications include:
  • Review title and description
  • Urgency indicator
  • Proposed action
  • Dashboard link
  • Quick actions (if configured)

Next Steps