Git Product home page Git Product logo

slackcmdtest's Introduction

このプロジェクトは自分の勉強用です。

  • Slack Apps
  • Google Apps Script
  • node-google-apps-script
  • ... and GitHub

Slackコマンドの追加(GASで実装):連携確認まで

GASの作成と公開

  1. GAS新規作成
    Google Driveから[New]>..※..>[Google Apps Script]
    ※Google Apps Scriptがない場合は、追加する。
    ※Spreadsheetのマクロ(Container-bound Script)で作成する場合は、 [Tools]>[Script editor...]から作成。以下の手順は同様。

  2. デフォルトで作成されるmyFunction()をdoPost()にして、動作確認用のコードを編集
    例:

function doPost() {  
    return ContentService.createTextOutput("Hello, world!");  
} 
  1. 適当な名前で保存

  2. 公開
    [Publish]>[Deploy as web app...]

    • Project Version: New
    • Who has access to the app: Anyone, even anonymous ※
      ※TODO:この辺要確認。
  3. Current web app URLをコピー

Slackに新規アプリの追加

  1. アプリ新規作成
    Teamのメニューから、[Apps&integrations]>[Build]>[Your Apps]>[Create New App]選択
    ※または、Channel画面の[Channel Settings]から[Add an app or integrations]>[Build]>...

    • App Name: 適当に
    • Development Slack Team: Teamを選択
    • [Create App]
  2. コマンド新規作成
    左メニューの[Features]-[Slash Commands]>[Create New Command]

    • Command: 作成したいコマンド
    • Request URL: GASのCurrent web app URL
    • Short Description: 適当に
    • Usage Hint: (オプション)適当に
    • [Save]
  3. Teamに本アプリをインストール 左メニューの[Settings]-[Install App]>[Install App to Team]

    • [Authorize]

コマンド確認

  1. Slackで作成したコマンドを[Send]
    上記例の場合、「Hello, World!」が返ってくればOK。

GASファイルをGit/GitHubで管理

以下のページ等を参考にさせてもらいました。

slackcmdtest's People

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.