Slack App Setup
Workspace bot with slash commands and events
Overview
The Slack app enables SingularCore to receive commands and send notifications through your Slack workspace. It supports slash commands, event subscriptions, and direct messaging for maximum flexibility.
Difficulty
Moderate
Setup Time
10 minutes
Notification Tiers
Normal, High, Urgent
Prerequisites
- Slack workspace admin access
- Python 3.9+
slack-sdklibrary- Public URL or ngrok for webhooks
Step-by-Step Setup
Create Slack App
- Go to api.slack.com/apps
- Click Create New App
- Select From scratch
- Name your app (e.g., "SingularCore")
- Select your workspace
- Click Create App
Configure OAuth Scopes
In the left sidebar, go to OAuth & Permissions:
- Scroll to Scopes section
- Add the following Bot Token Scopes:
chat:write- Send messageschat:write.public- Send messages to public channelsim:write- Send direct messagescommands- Add slash commandsapp_mentions:read- Read app mentions
Install to Workspace
- Go to OAuth & Permissions
- Click Install to Workspace
- Authorize the app
- Copy the Bot User OAuth Token (starts with
xoxb-) - Also copy the Signing Secret from Basic Information page
Enable Events
In Event Subscriptions:
- Toggle Enable Events to On
- Set Request URL to your webhook endpoint (e.g.,
https://your-domain.com/slack/events) - Subscribe to bot events:
app_mention- When app is mentionedmessage.im- Direct messages to app
Create Slash Commands
In Slash Commands:
- Click Create New Command
- Add the following commands:
/singularcore-status
Request URL: https://your-domain.com/slack/commands
Description: Get system health status
/singularcore-skills
Request URL: https://your-domain.com/slack/commands
Description: List available skills
/singularcore-approve
Request URL: https://your-domain.com/slack/commands
Description: Approve pending action
Configure App
Edit config/comms.json:
{
"slack": {
"enabled": true,
"bot_token": "xoxb-your-bot-token-here",
"signing_secret": "your-signing-secret-here",
"webhook_url": "https://your-domain.com/slack/events",
"allowed_channels": ["#general", "#alerts"],
"allowed_users": ["U12345678"],
"auto_setup": true
}
}Supported Commands
| Command | Description | Tier |
|---|---|---|
| /singularcore-status | System health check | 0 |
| /singularcore-skills | List all skills | 0 |
| /singularcore-dream | View last dream summary | 0 |
| /singularcore-approve <id> | Approve pending action | 1+ |
| /singularcore-reject <id> | Reject pending action | 1+ |
| @SingularCore <message> | Mention app to submit goal | 1+ |
| DM (direct message) | Submit text as goal | 1+ |
Troubleshooting
App Not Responding
- Verify bot token starts with
xoxb- - Check webhook URL is publicly accessible
- Verify signing secret is correct
- Ensure app is installed to workspace
"invalid_auth" Error
- Reinstall app to workspace to refresh token
- Check token hasn't been revoked
- Verify correct workspace is selected
Slash Commands Not Working
- Verify Request URL is correct and responds with HTTP 200
- Check webhook endpoint handles POST requests
- Ensure commands are saved and app is reinstalled
Events Not Received
- Verify Request URL responds to challenge request
- Check bot is invited to channel for app mentions
- Ensure events are subscribed in app settings
Need More Details?
View the complete setup guide with code examples, advanced configuration, and security best practices.
View Full DocumentationDocumentation Menu
Slack App Setup
Workspace bot with slash commands and events
Overview
The Slack app enables SingularCore to receive commands and send notifications through your Slack workspace. It supports slash commands, event subscriptions, and direct messaging for maximum flexibility.
Difficulty
Moderate
Setup Time
10 minutes
Notification Tiers
Normal, High, Urgent
Prerequisites
- Slack workspace admin access
- Python 3.9+
slack-sdklibrary- Public URL or ngrok for webhooks
Step-by-Step Setup
Create Slack App
- Go to api.slack.com/apps
- Click Create New App
- Select From scratch
- Name your app (e.g., "SingularCore")
- Select your workspace
- Click Create App
Configure OAuth Scopes
In the left sidebar, go to OAuth & Permissions:
- Scroll to Scopes section
- Add the following Bot Token Scopes:
chat:write- Send messageschat:write.public- Send messages to public channelsim:write- Send direct messagescommands- Add slash commandsapp_mentions:read- Read app mentions
Install to Workspace
- Go to OAuth & Permissions
- Click Install to Workspace
- Authorize the app
- Copy the Bot User OAuth Token (starts with
xoxb-) - Also copy the Signing Secret from Basic Information page
Enable Events
In Event Subscriptions:
- Toggle Enable Events to On
- Set Request URL to your webhook endpoint (e.g.,
https://your-domain.com/slack/events) - Subscribe to bot events:
app_mention- When app is mentionedmessage.im- Direct messages to app
Create Slash Commands
In Slash Commands:
- Click Create New Command
- Add the following commands:
/singularcore-status
Request URL: https://your-domain.com/slack/commands
Description: Get system health status
/singularcore-skills
Request URL: https://your-domain.com/slack/commands
Description: List available skills
/singularcore-approve
Request URL: https://your-domain.com/slack/commands
Description: Approve pending action
Configure App
Edit config/comms.json:
{
"slack": {
"enabled": true,
"bot_token": "xoxb-your-bot-token-here",
"signing_secret": "your-signing-secret-here",
"webhook_url": "https://your-domain.com/slack/events",
"allowed_channels": ["#general", "#alerts"],
"allowed_users": ["U12345678"],
"auto_setup": true
}
}Supported Commands
| Command | Description | Tier |
|---|---|---|
| /singularcore-status | System health check | 0 |
| /singularcore-skills | List all skills | 0 |
| /singularcore-dream | View last dream summary | 0 |
| /singularcore-approve <id> | Approve pending action | 1+ |
| /singularcore-reject <id> | Reject pending action | 1+ |
| @SingularCore <message> | Mention app to submit goal | 1+ |
| DM (direct message) | Submit text as goal | 1+ |
Troubleshooting
App Not Responding
- Verify bot token starts with
xoxb- - Check webhook URL is publicly accessible
- Verify signing secret is correct
- Ensure app is installed to workspace
"invalid_auth" Error
- Reinstall app to workspace to refresh token
- Check token hasn't been revoked
- Verify correct workspace is selected
Slash Commands Not Working
- Verify Request URL is correct and responds with HTTP 200
- Check webhook endpoint handles POST requests
- Ensure commands are saved and app is reinstalled
Events Not Received
- Verify Request URL responds to challenge request
- Check bot is invited to channel for app mentions
- Ensure events are subscribed in app settings
Need More Details?
View the complete setup guide with code examples, advanced configuration, and security best practices.
View Full Documentation