Create Slack App
Create Slack App
First, you will need to navigate to Slack api to create an app with a name and a Slack domain. Here we walk through creating a simple slack app which allows a bot to post a message to a user.
We suggest setting up your Slack app on a development workspace first.
- Navigate to Slack’s Your Apps page and click Create an App.
- Enter an App Name, for example, ScriptRunner Integration.
- Choose your Development Slack Workspace. You’ll need to either sign in to your workspace or create a new workspace to add it as your development workspace.
- Navigate to OAuth & Permissions and click Add an OAuth Scope under Bot Token Scopes.
These scopes tell your app the permissions that it has access to, such as sending messages or viewing rooms.
For example, add the im:write scope if you want your Slack bot to post a message to a user. You can edit this later to add extra permissions, such as chat:write and chat:write:public to post to a channel.
- Once you have added at least one scope, navigate to App Home.
- Click Edit to change the Display Name and Default username for your bot (the app uses the bot user to post in the workspace). The Display Name is the name that will be displayed on Slack when a message is sent.
- Click Save.
- Navigate back to the OAuth and Permissions tab and click Install to Workspace to install the app.
The Bot Oauth Access Token now displays at the top of the OAuth & Permissions page. This is the token the feature needs to send messages, click the Copy button.