Giter VIP home page Giter VIP logo

slack-app's Introduction

slack-app (KOTORI)

ワークスペースにチャンネル追加、絵文字の追加、新メンバーの参加などのイベントがあったときの通知をしてくれるSlack App。 Netlifyでの動作を前提としています。

変更方法

src/events.jsの内容を変更し、masterブランチに変更が乗ったタイミングで変更が反映されます。
基本的にはPull Requestから変更が行われることを想定しています。

初期設定

engineers-ltではすでに設定が済んでいるため、操作は不要です。

Netlifyにデプロイ

Deploy to Netlify

  1. 上のボタンからデプロイ。(netlify.tomlの内容を元にデプロイされます。)
  2. NetlifyのFunctionsタブからevents.jsを選択。
  3. ページ上部のURLをメモ。

Slack App側の設定

  1. https://api.slack.com/eapps よりアプリを登録。
  2. Event SubscriptionsでEnable EventsをONに、Request URLに先程メモしたURLを入力。
  3. Event Subscriptions内のSubscribe to Workspace Eventschannel_changed, emoji_changed, team_joinを選択。
  4. OAuth & PermissionsでPermissonにchat:write:botを追加。
  5. Installed Appでアプリをワークスペースにインストール。
  6. インストールして得られたOAuth Access Tokenをメモ。

Netlifyの環境変数を設定

  1. 「Slack App側の設定」で得られたOAuth Access TokenをSLACK_TOKENとして設定。
  2. 再度デプロイをして動作確認。

slack-app's People

Contributors

mottox2 avatar tbpgr avatar dependabot[bot] avatar

Stargazers

Uchiru avatar ITO Tetsunosuke avatar zaki avatar  avatar

Watchers

James Cloos avatar  avatar zaki avatar tomouchi avatar

slack-app's Issues

新規訪問者への自己紹介・参加ガイドの閲覧依頼の通知を追加する

目的

今まで、手動で新規訪問者への通知を行っていたが、運用効率化のために自動化する。

変更内容

ユーザー新規追加の通知メッセージを追加する。
※既存の #feed へのメッセージの他に #自己紹介 へのメッセージも追加する。

メッセージ先

#自己紹介 channel

channel.id = "CDCR60V0V" です。

https://engineers-lt.slack.com/messages/CDCR60V0V

メッセージ内容

:new: user_added

@hoge さん、 エンジニアの登壇を応援する会の Slack へようこそ :smile:
自己紹介をお願いします。
また、以下の参加ガイドをご確認ください :pray:

https://esa-pages.io/p/sharing/10407/posts/320/0bb2faf43a53b3226482.html

です。

@hoge => 新規のユーザーへの通知

オンボーディング的に Slack に参加する人がはじめに確認するメッセージなので、人間味のある内容にした上で、好意の感情と依頼の感情を Emoji で追加しました。

関連情報

各イベント用のテストを書く

デバッグするときにSlackの仕様を把握していないとしんどい。
テストを実行したら、Slackの仕様に基づいたJSONを受け取る形にして機能追加を容易にする。

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.