|
| 1 | +--- |
| 2 | +title: "Slack bot" |
| 3 | +description: "Get Writer Agent notifications and interact with your documentation directly in Slack" |
| 4 | +icon: "slack" |
| 5 | +--- |
| 6 | + |
| 7 | +<Info> |
| 8 | + The Slack bot integration is available on [Pro and Custom plans](https://mintlify.com/pricing?ref=slack-bot). |
| 9 | +</Info> |
| 10 | + |
| 11 | +## About the Slack bot |
| 12 | + |
| 13 | +The Slack bot brings your documentation's Writer Agent capabilities directly into your Slack workspace. It provides real-time notifications when documentation updates are completed and enables direct messaging for documentation assistance. |
| 14 | + |
| 15 | +The bot integrates with Mintlify's Writer Agent system to: |
| 16 | + |
| 17 | +* **Send completion notifications** when Writer Agent finishes processing documentation updates |
| 18 | +* **Handle direct messages** for documentation questions and assistance |
| 19 | +* **Format messages properly** with support for Slack's native formatting (bold text, links, user mentions, channel references) |
| 20 | +* **Display pull request links** and other relevant information in a user-friendly format |
| 21 | + |
| 22 | +## Setting up the Slack bot |
| 23 | + |
| 24 | +### Prerequisites |
| 25 | + |
| 26 | +Before setting up the Slack bot, ensure you have: |
| 27 | + |
| 28 | +* A Slack workspace with admin permissions |
| 29 | +* A Mintlify Pro or Custom plan |
| 30 | +* Access to your Slack app configuration |
| 31 | + |
| 32 | +### Required OAuth scopes |
| 33 | + |
| 34 | +Configure your Slack app with the following OAuth scopes for full functionality: |
| 35 | + |
| 36 | +#### Bot token scopes |
| 37 | +* `im:read` - Read DM channel information |
| 38 | +* `im:write` - Send DM responses |
| 39 | +* `im:history` - **Critical:** Receive DM message events |
| 40 | +* `channels:history` - Receive channel message events |
| 41 | +* `groups:history` - Receive private channel events |
| 42 | +* `mpim:history` - Receive group DM events |
| 43 | + |
| 44 | +### Event subscriptions |
| 45 | + |
| 46 | +Configure these bot event subscriptions in your Slack app settings: |
| 47 | + |
| 48 | +* `message.im` - Direct message events |
| 49 | +* `message.channels` - Public channel messages |
| 50 | +* `message.groups` - Private channel messages |
| 51 | +* `message.mpim` - Group DM messages |
| 52 | +* `app_mention` - When the bot is mentioned |
| 53 | + |
| 54 | +### Installation steps |
| 55 | + |
| 56 | +1. **Create a Slack app** in your workspace or use an existing one |
| 57 | +2. **Configure OAuth scopes** as listed above |
| 58 | +3. **Set up event subscriptions** for the required message events |
| 59 | +4. **Install the app** to your workspace |
| 60 | +5. **Connect to Mintlify** through your dashboard settings |
| 61 | + |
| 62 | +## Using the Slack bot |
| 63 | + |
| 64 | +### Direct messaging |
| 65 | + |
| 66 | +You can send direct messages to the bot for documentation assistance: |
| 67 | + |
| 68 | +1. **Find the bot** in your Slack workspace |
| 69 | +2. **Send a direct message** with your question or request |
| 70 | +3. **Receive responses** with relevant documentation information |
| 71 | + |
| 72 | +The bot will respond to direct messages and exclude its own messages to prevent loops. |
| 73 | + |
| 74 | +### Notification display |
| 75 | + |
| 76 | +The bot automatically sends notifications to configured channels when: |
| 77 | + |
| 78 | +* Writer Agent completes documentation updates |
| 79 | +* Pull requests are processed |
| 80 | +* Documentation builds finish |
| 81 | + |
| 82 | +### Message formatting |
| 83 | + |
| 84 | +The bot properly handles Slack's native formatting: |
| 85 | + |
| 86 | +* **Bold text** using single asterisks (`*bold*`) |
| 87 | +* **Links** formatted as `<url|display text>` |
| 88 | +* **User mentions** as `<@USER_ID>` |
| 89 | +* **Channel references** as `<#CHANNEL_ID>` |
| 90 | + |
| 91 | +## Dashboard integration |
| 92 | + |
| 93 | +Monitor your Slack bot activity through the Mintlify dashboard: |
| 94 | + |
| 95 | +### Real-time status |
| 96 | + |
| 97 | +View the current status of your Slack bot integration, including: |
| 98 | + |
| 99 | +* Connection status |
| 100 | +* Recent activity |
| 101 | +* Message delivery status |
| 102 | + |
| 103 | +### Notification settings |
| 104 | + |
| 105 | +Configure which events trigger Slack notifications: |
| 106 | + |
| 107 | +* Writer Agent completion notifications |
| 108 | +* Documentation build status |
| 109 | +* Error alerts and warnings |
| 110 | + |
| 111 | +### Message history |
| 112 | + |
| 113 | +Review recent bot interactions and notifications sent to your Slack workspace. |
| 114 | + |
| 115 | +## Troubleshooting |
| 116 | + |
| 117 | +### Bot not responding to direct messages |
| 118 | + |
| 119 | +1. **Verify OAuth scopes** - Ensure `im:history` scope is enabled |
| 120 | +2. **Check event subscriptions** - Confirm `message.im` events are configured |
| 121 | +3. **Reinstall the app** if permissions were recently changed |
| 122 | + |
| 123 | +### Missing notifications |
| 124 | + |
| 125 | +1. **Review notification settings** in your Mintlify dashboard |
| 126 | +2. **Check channel permissions** - Ensure the bot can post to target channels |
| 127 | +3. **Verify webhook URLs** are correctly configured |
| 128 | + |
| 129 | +### Message formatting issues |
| 130 | + |
| 131 | +The bot automatically handles Slack formatting. If messages appear incorrectly: |
| 132 | + |
| 133 | +1. **Check message content** for unsupported formatting |
| 134 | +2. **Review channel settings** for any message restrictions |
| 135 | +3. **Contact support** if formatting issues persist |
| 136 | + |
| 137 | +## Best practices |
| 138 | + |
| 139 | +### Channel organization |
| 140 | + |
| 141 | +* **Dedicate channels** for documentation notifications |
| 142 | +* **Use threading** for related discussions |
| 143 | +* **Pin important** bot messages for easy reference |
| 144 | + |
| 145 | +### User engagement |
| 146 | + |
| 147 | +* **Train team members** on how to interact with the bot |
| 148 | +* **Share documentation links** from bot responses |
| 149 | +* **Use mentions** to involve relevant team members in discussions |
| 150 | + |
| 151 | +### Monitoring |
| 152 | + |
| 153 | +* **Review bot activity** regularly through the dashboard |
| 154 | +* **Monitor message volume** to understand usage patterns |
| 155 | +* **Adjust notification settings** based on team feedback |
0 commit comments