2021-05-19
3202
#node
Adebola Adeniran
49980
May 19, 2021 ⋅ 11 min read

Build a Slackbot in Node.js with Slack’s Bolt API 

Adebola Adeniran Hi! I'm Adebola! I'm a full-stack React/Node.js and Ruby on Rails engineer from Nigeria. I mentor junior developers via the Google Developer Program, and I'm a regular contributor to some of the most widely read programming blogs. You can follow me on Twitter @debosthefirst.

Recent posts:

Implementing Infinite Scroll In Next Js With Server Actions

Implementing infinite scroll in Next.js with Server Actions

Infinite scrolling in Next.js no longer requires external libraries — Server Actions let us fetch initial data directly on the server.

Rahul Chhodde
Apr 19, 2024 ⋅ 10 min read
Integrating Django Templates With React For Dynamic Webpages

Integrating Django templates with React for dynamic webpages

Create a dynamic demo blog site using Django and React to demonstrate Django’s server-side functionalities and React’s interactive UI.

Kayode Adeniyi
Apr 18, 2024 ⋅ 7 min read
Using Aoi Js To Build A Bot For Discord

Using aoi.js to build a bot on Discord

Explore how the aoi.js library makes it easy to create Discord bots with useful functionalities for frontend applications.

Rahul Padalkar
Apr 17, 2024 ⋅ 9 min read
Web Components Adoption Guide: Overview, Examples, And Alternatives

Web Components adoption guide: Overview, examples, and alternatives

Evaluate Web Components, a set of standards that allow you to create custom HTML tags for more reusable, manageable code.

Elijah Asaolu
Apr 16, 2024 ⋅ 11 min read
View all posts

6 Replies to "Build a Slackbot in Node.js with Slack’s Bolt API "

  1. Not sure if this is a recent update to Slack, but I was seeing “Sending messages to this app has been turned off” in my messages tab for the app in Slack. In Slack, when configuring settings for my App, I had to go to “App Home” and make sure to check “Allow users to send Slash commands and messages from the messages tab”. Then, I restarted Slack, and was able to send messages to my app.

  2. I followed the instructions up to Events Subscription but I keep getting an error “dispatch failed” when trying to communicate with my bot on slack.

  3. Hello Debola, thanks for the article. I followed through coded along, i am having errors with the ngrok(Deceptive site ahead). U tried reaching you via twitter, i couldn’t find your account…it would be nice if you surface

  4. Hey there everyone, please append /slack/events to your ngrok URL and that should solve the problem!

    Apologies for omitting that line in the article.

  5. Hi, I’ve followed the steps and when I get to test if the slash command works I get the following error:
    (node:8730) UnhandledPromiseRejectionWarning: Error: An API error occurred: missing_scope
    at platformErrorFromResult (/Users/brunobacelar/Projects/node/get-bugs/node_modules/@slack/web-api/dist/errors.js:51:33)
    at WebClient.apiCall (/Users/brunobacelar/Projects/node/get-bugs/node_modules/@slack/web-api/dist/WebClient.js:167:56)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    (Use `node –trace-warnings …` to show where the warning was created)
    (node:8730) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `–unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
    (node:8730) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

    I’m not using socket mode on, I’m using http.
    ngrok server is online

Leave a Reply