Giter Site home page Giter Site logo

gas-asana-task-notifier's Introduction

gas-asana-task-notifier

Slack投稿サンプル

Asanaの特定プロジェクトにある完了済みタスクを、Slackに投稿するGoogle App Scriptです。

完了タスクが多い場合、最新20件を取得します。

Requirements

  • Git
  • Node.js
  • Googleアカウント
  • Asanaのアクセストークン
  • SlackのIncoming Webhook URL

Install

  1. リポジトリをclone

    $ git clone https://github.com/nafuka11/gas-asana-task-notifier.git
    
  2. cloneしたリポジトリのディレクトリに移動し、必要なパッケージをインストール

    $ npm install
    
  3. Googleアカウントのログイン。アカウントを選択し、リクエストを許可する

    $ npm run login
    
  4. https://script.google.com/home/usersettings にアクセスし、Google Apps Script APIの設定をオンにする

  5. Google App Scriptのプロジェクトを新規作成

    $ npm run create
    
  6. ローカルのソースコードをプロジェクトにアップロード

    $ npm run push
    
  7. プロジェクトをブラウザ上で開く

    $ npm run open
    
  8. ファイル > プロジェクトのプロパティから、スクリプトのプロパティを追加する

    プロパティ
    ASANA_ACCESS_TOKEN Asanaのアクセストークン
    ASANA_PROJECT_ID タスク取得対象のプロジェクトID(URLの数字)
    SLACK_URL SlackのIncoming Webhook URL
  9. 編集 > 現在のプロジェクトのトリガー > トリガーを追加(画面右下) 実行する関数はmainとしてください。

    ※トリガー追加時に「このアプリは確認されていません」画面が出ますが、詳細から安全ではないページに移動し、権限を付与してください。

gas-asana-task-notifier's People

Contributors

dependabot[bot] avatar nafuka11 avatar

Watchers

 avatar

gas-asana-task-notifier's Issues

通知タスク数がmin(20 - tasks.length, task.length)となる

Asanaから取得したタスク数が 20 - tasks.length < tasks.length の時、
通知タスク数が 20 - tasks.length となる。
(例えば、tasks.length = 16の時、通知タスク数4となる)

spliceの第一引数startが負数となり、末尾からのインデックスとなっているため。
tasksへ要素追加を行わないため、spliceではなくsliceを使うべき。

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.