Introduction

Integrate Gurubase with Slack to ask your Guru directly within your Slack workspace.

For self-hosted version, you first need to setup a Slack App manually to get a bot token. Please refer to the Slack App Setup for Self-hosted version section for more details.

Steps to Integrate

  1. Navigate to Integrations

    • Go to the Gurubase dashboard.
    • Click on “My Gurus” under the profile
    • Click on the Guru you want to integrate with Slack
  2. Select Slack Bot

    • Click on the “Slack Bot” option.
  1. Connect to Slack
    • Click the “Connect” button.
    • Authorize Gurubase to access your Slack workspace.
  1. Select Channels
    • Choose the channels you want to integrate with Gurubase.
    • Click “Save”.

To subscribe to a private channel and send test messages to it, you need to invite the bot to the channel. You can do so from the Slack app using the “Add apps to this channel” command. This is not needed for public channels.

  1. Test the Connection
    • Use the “Send Test Message” button to ensure the integration is working.

Permissions

Gurubase will request the following permissions:

  • View content and info about channels & conversations.
  • Perform actions in channels & conversations and send messages as Gurubase bot.

Using the Bot

Once integrated, you can mention the bot using @Gurubase.io in your Slack channels to ask questions directly to your Guru.

For self-hosted version, you need to mention the bot using @<app_name_you_gave_to_the_bot> instead of @Gurubase.io.

Slack App Setup for Self-hosted version

For self-hosted version, you need to create your own Slack app to create a bot to integrate with your Gurubase Self-hosted instance. Below are the steps to create the app and get the bot token.

  1. Go to https://api.slack.com/apps and click “Create New App”.
  2. Select “From scratch”, give it a name and pick your workspace.
  3. Slack will send events to /slack/events/ endpoint of your Gurubase backend instance. If the backend URL is not public, you need to open it to public. You can use ngrok to do this:
    • If you haven’t changed the default ports of Gurubase, port 8029 is for the frontend UI, and port 8028 is for the backend. You need to use the backend URL to make it accessible to the public.
    • Make backend URL public with ngrok http http://localhost:8028
    • Copy the public URL from the ngrok terminal as shown below:
  1. Go to “Event Subscriptions” page on your Slack app and enable it.
  2. Set your public url along with the path /slack/events/ as “Request URL”, this is the url that Slack will send the events to. Be careful with the trailing slash at the end of the url.
    • ${your_public_backend_url}/slack/events/

If you change the backend URL, you need to update the “Request URL” with the new URL.

  1. Expand the “Subscribe to bot events” section on “Event Subscriptions” page and add the following events:
    • message.channels
    • message.groups
  1. Save changes.
  2. Go to “OAuth & Permissions” page on Slack app. Scroll to “Bot Token Scopes” under “Scopes” section and add the following permissions:
    • channels:join
    • channels:read
    • chat:write
    • groups:read
    • channels:history
    • groups:history
  1. Go to “Install App” page. Then click “Install to [your_workspace_name]”.
  2. Go through the OAuth flow.
  3. After installation, you will be redirected to the same page.
  4. Copy “Bot User OAuth Token”.
  5. Go to your guru’s Slack integration page in the Gurubase UI and paste the bot token you copied and click “Connect”.
  1. You can now follow the Steps to Integrate.

Next Steps

Explore more integrations and enhance your productivity with Gurubase.

Next Steps