A Summary of the Official Building a Bolt JS App
- Create a new slack app in the apps portal.
- Go to Basic Information page in the apps portal and install the app in your Slack instance.
- To edit and host the code for your slack app: Create a Glitch app from Slack’s template.
- Copy the signing secret and the Bot token from Basic Information and OAuth pages in the apps portal into your glitch app’s .env file.
- Go to Event Subscriptions in the apps portal and add app_home_opened.
- request_url for glitch apps is https://YOUR_APP_NAME.glitch.me/slack/events.
- Add bot event app_home_opened. Save changes.
- Go to your app’s “home” page in the Slack app. You should see the example text and button from the code in Glitch.
- You can now use shortcuts, listen for events, post messages, and more with the bolt js framework. To try one, just replace the example “app.home.opened” function.
- Each of the functions above has listener functions for interacting with Slack.
Add a Shortcut in a Bolt JS Slack App
- Go to your app’s Interactivity page in the apps portal.
- request_url for glitch apps is https://YOUR_APP_NAME.glitch.me/slack/events.
- Name is whatever you want showing up in the Slack app.
- callback_id is your function name that you will use in your code.
- In glitch, add the code from https://slack.dev/bolt-js/concepts#shortcuts.
- That’s it. To add more functionality to your shortcut, check out https://github.com/slackapi/bolt-js#making-things-happen.