diff --git a/ai/slack-bot.mdx b/ai/slack-bot.mdx new file mode 100644 index 000000000..c65c27dbf --- /dev/null +++ b/ai/slack-bot.mdx @@ -0,0 +1,93 @@ +--- +title: "Slack bot" +description: "Get Writer Agent notifications and interact with your documentation directly in Slack" +icon: "slack" +--- + +The Slack bot integration enables direct messaging with the Writer Agent system and provides automated notifications for documentation updates. Users can receive real-time notifications about pull request completions and interact with the bot through direct messages. + +## Features + +### Direct message handling + +The bot responds to direct messages from users and provides intelligent responses based on your documentation content. It filters out bot messages to prevent loops and uses type-safe message handling. + +### Automated notifications + +Receive notifications when the Writer Agent completes tasks, including: + +- Pull request completion notifications +- Documentation update confirmations +- Formatted links to relevant pull requests + +### Message formatting + +The bot properly handles Slack-formatted messages including: + +- **Bold text** using single asterisks +- Links formatted as `` +- User mentions as `<@USER_ID>` +- Channel references as `<#CHANNEL_ID>` + +## Setting up the Slack bot + +### Required OAuth scopes + +Configure your Slack app with these OAuth scopes for full functionality: + +| Scope | Purpose | +|:------|:--------| +| `im:read` | Read DM channel information | +| `im:write` | Send DM responses | +| `im:history` | **Critical:** Receive DM message events | +| `channels:history` | Receive channel message events | +| `groups:history` | Receive private channel events | +| `mpim:history` | Receive group DM events | + +### Event subscriptions + +Configure these bot event subscriptions in your Slack app settings: + +- `message.im` - Direct message events +- `message.channels` - Public channel messages +- `message.groups` - Private channel messages +- `message.mpim` - Group DM messages +- `app_mention` - When the bot is mentioned + +### Bot configuration + +1. Navigate to your Slack app settings +2. Add the required OAuth scopes listed above +3. Configure the event subscriptions +4. Install the bot to your workspace +5. Invite the bot to relevant channels where you want notifications + +## Using the Slack bot + +### Direct messaging + +Send direct messages to the bot to: + +- Ask questions about your documentation +- Request information about recent updates +- Get help with Writer Agent features + +### Receiving notifications + +The bot automatically sends notifications for: + +- Completed Writer Agent tasks +- Documentation updates +- Pull request status changes + +Notifications include formatted links and relevant context to help you stay informed about your documentation workflow. + +## Dashboard integration + +The Slack bot status and activity are displayed in your dashboard, showing: + +- Real-time bot status +- Writer Agent completion notifications +- Message history and interaction logs + +This integration helps you monitor bot activity and understand how your team interacts with the documentation through Slack. \ No newline at end of file diff --git a/docs.json b/docs.json index b451ec3d7..5b903d1b6 100644 --- a/docs.json +++ b/docs.json @@ -51,6 +51,7 @@ "group": "AI optimization", "pages": [ "guides/assistant", + "ai/slack-bot", "ai/llmstxt", "ai/contextual-menu", "ai/model-context-protocol",