Giter Club home page Giter Club logo

delete_slack_log_gas's Introduction

delete_slack_log_gas

概要

Slack上の、特定チャンネルの、特定日時以前の過去ログを自動で削除する、GoogleAppsScript

使い方

Slack Appsを作成する

  1. https://api.slack.com/apps からslack appsを新規作成
  2. 機能>OAuth & 権限 ページで、スコープを設定する
  3. 設定>アプリをインストール ページで、インストールする
  4. 機能>OAuth & 権限 ページで、OAuthアクセストークンをコピーする

Google Apps Script を作成する

  1. Googleドライブ内にGoogle Apps Scriptを作成
  2. GASのファイル>プロジェクトのプロパティ>スクリプトのプロパティに、OAuthアクセストークンをペースト
名前: slack_oauth_access_token 値: OAuthアクセストークンの値
  1. src.jsのコードを修正
  // ログを自動削除するチャンネル名と、何日分のメッセージを残しておくかを設定
  var objTargetChannels = {
    'チャンネル名': '14'
    , 'チャンネル名': '14'
  }
  1. src.jsのコードをGASエディター上にペースト
  2. GASエディターで、トリガーを設定

delete_slack_log_gas's People

Contributors

mokmokjp avatar

Stargazers

 avatar  avatar

Forkers

tkmkmaya

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.