Slack app example for Heroku deployment, written in Kotlin, using Bolt framework.

Overview

slack-kotlin-heroku-example

Slack app example for Heroku deployment, written in Kotlin, using Bolt framework.

You need to configure your Slack app to run this as backend. Follow the official guide for that.

This example hosts two commands. /hello command is from this guide, and /meeting command is from this guide.

Run locally

To run this locally, create .env file on the project root, with following content.

PORT=3000
SLACK_BOT_TOKEN=<your_bot_token>
SLACK_SIGNING_SECRET=<your_signing_secret>

Replace <your_bot_token> and <your_signing_secret> with yours.

Then run.

gradlew run # Or from IntelliJ IDEA "Run" button.

Note that to actually trigger this from your Slack workspace, you need to expose this on the Internet. You can use ngrok or something for that.

Heroku deployment

Follow this guide to set up.

Once you've created your Heroku app with heroku create, you can deploy

git push heroku master

and configure environment variables.

heroku config:set SLACK_BOT_TOKEN="<your_bot_token>"
heroku config:set SLACK_SIGNING_SECRET="<your_signing_secret>"

Using the Heroku hosting URL (shown as the output of git push heroku master), you need to replace the following settings on your Slack app configuration.

  • Features > Interactivity & Shortcuts > Request URL
  • Features > Slash Commands > /hello > Request URL
  • Features > Slash Commands > /meeting > Request URL

All of them should be set to https://<your_heroku_app_id>.herokuapp.com/slack/events.

Once reinstalled, you can run those commands from your Slack workspace!

You might also like...
Basic example of using ItemTouchHelper to add drag & drop and swipe-to-dismiss to RecyclerView.

Another drag and swipe library? This project is an example of basic drag & drop and swipe-to-dismiss with RecyclerView using ItemTouchHelper. It corre

This is an example for running a Python library (mishkal) in Android using chaquopy
This is an example for running a Python library (mishkal) in Android using chaquopy

chaquopy-mishkal This is an example for running a Python library (mishkal) in Android using chaquopy Code All the code that has been added to run the

App Tragos: a clean architecture app example
App Tragos: a clean architecture app example

CocktailApp This is a clean architecture app example built with Coroutines MVVM Extension Functions Dagger Hilt Retrofit Room Navigation Components Ca

馃摎  Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
馃摎 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

A feed for GitHub, written in Kotlin using Jetpack Compose.

Gimmick A while back, I noticed that the official GitHub app doesn't have a feed similar to the one can find on the GitHub homepage. Naturally I had t

Android Camper parking app written in kotlin for assignment 2 of Mobile App Development
Android Camper parking app written in kotlin for assignment 2 of Mobile App Development

Technical Report Splash view Application shows a splash screen when opened. The

A full-stack application showing the power 馃挭 of KOTLIN. Entire android app + backend Apis written in Kotlin 馃敟
A full-stack application showing the power 馃挭 of KOTLIN. Entire android app + backend Apis written in Kotlin 馃敟

Gamebaaz 馃幃 A full-stack application showing the power 馃挭 of KOTLIN. Entire android app + backend Apis written in Kotlin 馃敟 Android Backend Jetpack Co

A framework for building native applications using React

React Native Learn once, write anywhere: Build mobile apps with React. Getting Started 路 Learn the Basics 路 Showcase 路 Contribute 路 Community 路 Suppor

Example app for shortcuts
Example app for shortcuts

Android Shortcuts Example app for shortcuts in design library v25 Demo Manifest Add meta-data before /activity tag in Manifest.xml meta-data androi

Owner
null
This is a simple app to help get or set your Slack status from the command line.

Slack Status This is a simple app to help get or set your Slack status from the command line. The app is a Spring Boot app written in Kotlin. It uses

Steven Noto 1 Oct 16, 2021
Link previews between JetBrains Space and Slack

slack-unfurls This is the application for providing link previews between Slack and Space in both directions. It provides link previews for Slack mess

JetBrains 5 Sep 8, 2022
Github-Api-Pagination-Example - Pagination 3 Example using Github Api

Github-Api-Pagination Pagination 3 Example using Github Api Tech Stack 100% Kotl

Anggoro Beno Lukito 2 Aug 22, 2022
Simple blockchain example written in Kotlin

Blockchain in Kotlin This is a plain example how Cryptographic blockchains work by constructing a blockchain containing three blocks. Once constructed

Andrius Degutis 0 Feb 28, 2022
A small RPG example for a YouTube tutorial series using Kotlin, LibGDX, LibKTX and GDX-AI.

Mystic Woods A libGDX project generated with gdx-liftoff. This project was generated with a Kotlin project template that includes Kotlin application l

Simon 15 Dec 19, 2022
A showcase music app for Android entirely written using Kotlin language

Bandhook Kotlin This project is a small replica of the app I developed some time ago. Bandhook can still be found on Play Store At the moment it will

Antonio Leiva 1.9k Dec 23, 2022
Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.

Palette Helper is a simple utility app made to generate color palettes of images using Google's fantastic Palette library. It's mostly a for-fun pet p

Zac Sweers 154 Nov 18, 2022
Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.

Palette Helper is a simple utility app made to generate color palettes of images using Google's fantastic Palette library. It's mostly a for-fun pet p

Zac Sweers 154 Nov 18, 2022
馃殌 Sample Android Clean Architecture on Rorty App focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Clean Architecture Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development u

Mr.Sanchez 0 Dec 28, 2021
Simple Notes app, MVVM with Google Architectural components Room database, LiveData and ViewModel. Written in Kotlin using androidx libraries

Simple Notes app, MVVM with Google Architectural components Room database, LiveData and ViewModel. Written in Kotlin using androidx libraries. Implemented Firebase Auth and Database, and used Room database

Javokhir Jambulov 3 Aug 1, 2022