Giter VIP home page Giter VIP logo

slack's Introduction

Oh My Jordi Slack BOT

Image of Slack BOT

Jordy is my best friends. This is my an experiment to create a Slack bot. The Slack API provides fully features and heavily documented, which means it can be easy to get confused to getting start to trap the message event from Slack or push message to Slack Webhook.

In the repository, I implement Slack bot application with the Slack Node.js SDK and Express for HTTP Framework.

Prerequsitions

  • Create new app https://api.slack.com/apps?new_app=1.
  • Click "Add features and functionality > Bots" for choosing the features and configure your bot.
  • Grant oAuth for bot permission.
  • Copy token from OAuth & Permissions menu.

You can configure your bot profile in Basic Information.

oAuth permission scopes

How to develop Slack Bot in local

https://slack.dev/node-slack-sdk/tutorials/local-development

Usecase: Create BOT to listening workspace events

Your bot can subscribe all or specific of event in Slack such as new message in your channels.

Image of BOT Event

  • Start your node server. I am running using port :3000 for the example.
  • Start ngrok http 3000 I using ngrok for expose my node application to publicly accessible URL. This is how to setup https://api.slack.com/tutorials/tunneling-with-ngrok.
  • Go to Event Subscriptions menu, then enter your url. For example https://8e8ec2d7.ngrok.io/slack/events.
  • Grant oAuth Scope for bot event subscribe.

Read more about events https://api.slack.com/events/message

Use case: Interactive Messages

https://slack.dev/node-slack-sdk/interactive-messages

Use case: Slash Command slash command

create new commmand create new command

command desc

Interactive BOT Design tools

Use Slack Block Kit and Block Kit Builder to create interactive messages.

Use case: POST message back to Slack

https://api.slack.com/methods/chat.postMessage

Customize Slack BOT

slack.com/customize/slackbot

Other options

https://hubot.github.com/ provides capability to create a Slack bot and also contains give developer to use the tools to easily developer their own slack application.

slack's People

Contributors

iamgoangle avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.