Building a Slack app

Regardless of whether you're using Knock's managed approach to integrating Slack with SlackKit or building the flow entirely yourself, you'll need a Slack app to send notifications from Knock to a Slack workspace. If you haven’t built a Slack app yet, you can get started in Slack’s app documentation.

Once you create your Slack app, you’ll be routed to its app management page within the Slack dashboard. It looks like this.

Slack app management page

If you are new to Slack apps, a few key concepts to understand:

  • A scope is a permission granted to your Slack app when it joins a Slack workspace. You configure which scopes your app asks for in the OAuth & Permissions sidebar of your app management page.
  • Your Slack app is installed to a customer's workspace through the Slack OAuth flow. In this flow, your app requests scopes and the user installing the app confirms which scopes to grant. You’ll need to surface this OAuth flow to your users wherever you want them to install your Slack app.
  • A Slack app can have bot token scopes and user token scopes. For almost all use cases, you’ll be using bot token scopes. (This Slack doc explains why.) When you add bot token scopes to an app, you will also need to make sure your app has its display information configured. You can do this under the App Home sidebar on the app management page.

Next steps

Now you're ready to integrate Slack and Knock with SlackKit or if you prefer, you can follow the documentation to build the OAuth integration yourself with our Slack DIY guide.