VercelLogotypeVercelLogotype
LoginSign Up
Back to Templates

Slack Bolt with Hono

This is a generic Bolt for JavaScript (TypeScript) template app used to build out Slack apps with Hono

DeployView Demo
Slack + Hono

Slack Bolt with Hono Template

This is a generic Bolt for JavaScript (TypeScript) template app used to build Slack apps with Hono

Before getting started, make sure you have a development workspace where you have permissions to install apps. You can use a developer sandbox or create a workspace

Installation

Clone and install dependencies

git clone https://github.com/vercel-partner-solutions/slack-bolt-with-hono.git && cd slack-bolt-with-hono && pnpm install

Create a Slack App

  1. Open https://api.slack.com/apps/new and choose "From an app manifest"
  2. Choose the workspace you want to use
  3. Copy the contents of manifest.json into the text box that says "Paste your manifest code here" (JSON tab) and click Next
  4. Review the configuration and click Create
  5. On the Install App tab, click Install to <Workspace_Name>.
    • You will be redirected to the App Configuration dashboard
  6. Copy the Bot User OAuth Token into your environment as SLACK_BOT_TOKEN
  7. On the Basic Information tab, copy your Signing Secret into your environment as SLACK_SIGNING_SECRET

Prepare for Local Development

  1. Add your NGROK_AUTH_TOKEN to your .env file
    • You can get a free token here
  2. In the terminal run slack app link
  3. If prompted update the manifest source to remote select yes
  4. Copy your App ID from the app you just created
  5. Select Local when prompted
  6. Open .slack/config.json and update your manifest source to local
{
"manifest": {
"source": "local"
},
"project_id": "<project-id-added-by-slack-cli>"
}
  1. Start your local server using slack run. If prompted, select the workspace you'd like to grant access to
  • Select yes if asked "Update app settings with changes to the local manifest?"
  1. Open your Slack workspace, add your Slackbot to a channel, and send hello. Your app should reply with world!

Deploy to Vercel

  1. Create a new Slack app for production following the steps from above
  2. Create a new Vercel project here and select this repo
  3. Copy the Bot User OAuth Token into your Vercel environment variables as SLACK_BOT_TOKEN
  4. On the Basic Information tab, copy your Signing Secret into your Vercel environment variables as SLACK_SIGNING_SECRET
  5. When your deployment has finished, open your App Manifest from the Slack App Dashboard
  6. Update the manifest so all the request_url and url fields use https://<your-app-domain>/api/slack/events
  7. Click save and you will be prompted to verify the URL
  8. Open your Slack workspace and add your app to any channel
    • Note: Make sure you add the production app, not the local app we setup earlier
  9. Send hello and your app will respond with world!
  10. Your app will now automatically build and deploy whenever you commit to your repo. More information here

Project Structure

manifest.json

manifest.json defines your Slack app's configuration. With a manifest, you can create or update an app with a pre-defined configuration

src/bolt/app.ts

This is the Bolt app entry. It initializes @vercel/slack-bolt's VercelReceiver and registers listeners

src/bolt/listeners

Every incoming request is routed to a "listener". Inside this directory, we group each listener by Slack Platform feature, e.g. messages for message events

Server: src/index.ts

This file defines your POST request handler that receives Slack events. Its pathname matches the URLs defined in your manifest.json. Learn more about Hono routing here

Custom Scripts

  • pnpm dev:tunnel: A helper script to automatically start your Slack app with ngrok tunneling
GitHub Repovercel-partner-solutions/slack-bolt-with-hono
Use Cases
StarterBackend
Stack
Hono

Related Templates

Get Started

  • Templates
  • Supported frameworks
  • Marketplace
  • Domains

Build

  • Next.js on Vercel
  • Turborepo
  • v0

Scale

  • Content delivery network
  • Fluid compute
  • CI/CD
  • Observability
  • AI GatewayNew
  • Vercel AgentNew

Secure

  • Platform security
  • Web Application Firewall
  • Bot management
  • BotID
  • SandboxNew

Resources

  • Pricing
  • Customers
  • Enterprise
  • Articles
  • Startups
  • Solution partners

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Community

Frameworks

  • Next.js
  • Nuxt
  • Svelte
  • Nitro
  • Turbo

SDKs

  • AI SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDK
  • Streamdown AINew

Use Cases

  • Composable commerce
  • Multi-tenant platforms
  • Web apps
  • Marketing sites
  • Platform engineers
  • Design engineers

Company

  • About
  • Careers
  • Help
  • Press
  • Legal
  • Privacy Policy

Community

  • Open source program
  • Events
  • Shipped on Vercel
  • GitHub
  • LinkedIn
  • X
  • YouTube

Loading status…

Select a display theme:
    • AI Cloud
      • v0

        Build applications with AI

      • AI SDK

        The AI Toolkit for TypeScript

      • AI Gateway

        One endpoint, all your models

      • Vercel Agent

        An agent that knows your stack

      • Sandbox

        AI workflows in live environments

    • Core Platform
      • CI/CD

        Helping teams ship 6× faster

      • Content Delivery

        Fast, scalable, and reliable

      • Fluid Compute

        Servers, in serverless form

      • Observability

        Trace every step

    • Security
      • Bot Management

        Scalable bot protection

      • BotID

        Invisible CAPTCHA

      • Platform Security

        DDoS Protection, Firewall

      • Web Application Firewall

        Granular, custom protection

    • Company
      • Customers

        Trusted by the best teams

      • Blog

        The latest posts and changes

      • Changelog

        See what shipped

      • Press

        Read the latest news

      • Events

        Join us at an event

    • Learn
      • Docs

        Vercel documentation

      • Academy

        Linear courses to level up

      • Knowledge Base

        Find help quickly

      • Community

        Join the conversation

    • Open Source
      • Next.js

        The native Next.js platform

      • Nuxt

        The progressive web framework

      • Svelte

        The web’s efficient UI framework

      • Turborepo

        Speed with Enterprise scale

    • Use Cases
      • AI Apps

        Deploy at the speed of AI

      • Composable Commerce

        Power storefronts that convert

      • Marketing Sites

        Launch campaigns fast

      • Multi-tenant Platforms

        Scale apps with one codebase

      • Web Apps

        Ship features, not infrastructure

    • Tools
      • Marketplace

        Extend and automate workflows

      • Templates

        Jumpstart app development

      • Partner Finder

        Get help from solution partners

    • Users
      • Platform Engineers

        Automate away repetition

      • Design Engineers

        Deploy for every idea

  • Enterprise
  • Pricing
Log InContact
Sign Up
Sign Up
Back to Templates
DeployView Demo

Slack Agent Template

This is a Slack Agent template built with Bolt for JavaScript (TypeScript) and the Nitro server framework.
Slack Agent Template

Slack Bolt with Next.js

This is a generic Bolt for JavaScript (TypeScript) template app used to build out Slack apps with Next.js
Slack Bolt with Next.js

Slack Bolt with Nitro

This is a generic Bolt for JavaScript (TypeScript) template app used to build out Slack apps with the Nitro framework.
Slack Bolt with Nitro
v0

Build applications with AI

AI SDK

The AI Toolkit for TypeScript

AI Gateway

One endpoint, all your models

Vercel Agent

An agent that knows your stack

Sandbox

AI workflows in live environments

CI/CD

Helping teams ship 6× faster

Content Delivery

Fast, scalable, and reliable

Fluid Compute

Servers, in serverless form

Observability

Trace every step

Bot Management

Scalable bot protection

BotID

Invisible CAPTCHA

Platform Security

DDoS Protection, Firewall

Web Application Firewall

Granular, custom protection

Customers

Trusted by the best teams

Blog

The latest posts and changes

Changelog

See what shipped

Press

Read the latest news

Events

Join us at an event

Docs

Vercel documentation

Academy

Linear courses to level up

Knowledge Base

Find help quickly

Community

Join the conversation

Next.js

The native Next.js platform

Nuxt

The progressive web framework

Svelte

The web’s efficient UI framework

Turborepo

Speed with Enterprise scale

AI Apps

Deploy at the speed of AI

Composable Commerce

Power storefronts that convert

Marketing Sites

Launch campaigns fast

Multi-tenant Platforms

Scale apps with one codebase

Web Apps

Ship features, not infrastructure

Marketplace

Extend and automate workflows

Templates

Jumpstart app development

Partner Finder

Get help from solution partners

Platform Engineers

Automate away repetition

Design Engineers

Deploy for every idea