Skip to content

Slack Bot Application Setup Guide

This guide walks you through creating and configuring a Slack bot application from scratch.


1. Create a New Slack App

  1. Go to the Slack Apps page:

    https://api.slack.com/apps

  2. Click Create New App.

    Create New App

  3. Select From scratch.

    From Scratch

  4. Enter the App Name (this will be your bot’s name).

  5. Select the Workspace where the app will be installed.

    ⚠️ The workspace must already exist.

  6. Click Create App.

    Create App


2. Enable Event Subscriptions

  1. After creating the app, you will be redirected to the app settings page.

  2. From the left sidebar, click Event Subscriptions.

    Event Subscriptions

  3. Enable Event Subscriptions.

    Request URL

  4. In the Request URL field, enter the URL starting with:

    https://app.nuweb.com/api/public/channel/slack/XXXXXXXXXXXX/events

    This URL should be copied from the modal that opens in your application.

  5. On the same page, add the events shown in the screenshot.

    Add Events

  6. Click Save Changes at the bottom-right corner of the page.

  7. Add the following Subscribe to bot events:

 member_joined_channel   # A user joined a public channel, private channel or MPDM.
 member_left_channel     # A user left a public or private channel
 message.channels        # A message was posted to a channel
 message.groups          # A message was posted to a private channel
 message.im              # A message was posted in a direct message channel
 message.mpim            # A message was posted in a multiparty direct message channel

Save Changes


3. Configure OAuth & Permissions

  1. From the left sidebar, click OAuth & Permissions.

    Save Changes

  2. Under Scopes, add the following Bot Token Scopes:

    channels:history     # View messages and content in public channels the bot is added to
    channels:read        # View basic information about public channels
    chat:write           # Send messages as the bot
    groups:history       # View messages and content in private channels the bot is added to
    groups:read          # View basic information about private channels
    im:history           # View direct messages the bot is added to
    mpim:history         # View messages in group direct messages
    mpim:read            # View basic information about group direct messages
    users:read           # View people in a workspace
    users:read.email     # View email addresses of users
  3. Make sure channels:read , users:read.email are included in the scopes list.

    OAuth Scopes


4. Bot Settings

  1. Enable Always show my bot as online.

    Bot Online Setting

  2. Check the Allow users to send Slash commands and messages (or equivalent) checkbox.

    Allow Users to Send


5. Secrets Configuration

  1. Open the relevant configuration modal.

  2. Copy and store the following values securely:

    • Signing Secret
  3. Paste these values into your application’s configuration and save them.

    Secrets

  4. You need to click the “Install App” button in the left sidebar, then install the app to the selected workspace. After the installation is complete, you must copy the OAuth token and provide it to our UI.

    Secrets


6. Using the Bot

  • You should now see the bot listed under your Slack app.

    Slack UI

  • If the bot is not visible:

    • Open Slack
    • Use the search bar at the top
    • Type your bot’s name and select it

Inviting the Bot to a Channel

To interact with the bot in a channel:

  1. Invite the bot to the channel.
  2. Send a message mentioning the bot, for example:
text
@botname hi

The bot is now ready to receive and respond to events 🎉