Giter Club home page Giter Club logo

hue-kintai-slask-command's Introduction

clasp ci

What is this?

This bot can make HUE attendance from slack slash command.
This bot runs as a web app within a Google app script.
You can make this bot work by registering it as a request URL for the Slack API slash command.

REQUIREMENTS

USAGE

To use it, you need to set up Google apps scripts, and Slack API.

Steps

  1. Enable Google Apps Script API
    https://script.google.com/home/usersettings
  2. Clone this repository to your local machine.
  3. Run make push to install the dependencies and the necessary libraries, authenticate with Google, create a new GAS project and upload the code.
  4. Run make deploy to deploy the project as a web app.
    The first time you publish it as a web application, you will need to authorize it, so please follow the steps below. Open the script editor. (make open)
    Click Deploy > New deployment.
    Select Web app as the deployment type.
    Choose who can access your web app and who will execute it.
    Click Deploy.
    For more information, please refer to the official Google documentation.
    https://developers.google.com/apps-script/concepts/deployments
  5. Run make application to open the deployed web app in your browser. Follow the instructions on the web app to install the Slack app and perform OAuth authentication. The web app will automatically upload the App manifest to Slack and configure the necessary settings for you.

Register with the Slack API

Setting Script properties

In order to run the application and change its behavior, you need to set the following Google Apps scripts property.

Property name Required Setting Value Description
WORKS_DOMAIN ex) lwi0.hue.worksap.com, lwi0-cws.company.works-hi.com Specify a domain for the the HUE MOBILE login URL.
WORKS_PROXY_DOMAIN ex) miserarenaiyo.netlify.app Specify the URL where you deployed works-kintai-slask-command-netlify-functions
START_REACTION optional defalut: sunny (:sunny:) Set the reaction emoji for Mentored Attendance messages.
END_REACTION optional defalut: confetti_ball (:confetti_ball:) Set the reaction emoji for Mentored off messages.
  1. Open Project
    $ make open
  2. Add Scirpt properties
    File > Project properties > Scirpt properties > Add row
    Setting Property & Value

How to use

The usage of this bot is as follows.

  1. Invite bots to your channel (e.g. /invite @hue-kintai-bot)
  2. Register works authentication
    Enter your user ID and password in the dialog that appears after executing the following slash command.
    /kintai config
  3. Begin or end attendance
    You can send a message with a mentions or use the slash command to register your attendance.
  • When you go to work with a message with a Mention
    @hue-kintai-bot おはようございます。出勤します
    
  • If you use the slash command to go to work
    /kintai start
    

hue-kintai-slask-command's People

Contributors

k2tzumi avatar github-actions[bot] avatar tomoki-oke-litalico avatar dependabot[bot] avatar actions-user avatar takahiro-fukuda-litalico avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

hue-kintai-slask-command's Issues

特定のスレッド内からの投稿だと上手く勤怠打刻されない

起きている事

福祉ソフト_litalico_勤怠_出

打刻されない
Monosnap かんたん請求_勤怠 - ceo-office - Slack 2023-06-20 19-27-32

福祉ソフト_litalico_勤怠_退

打刻される
Monosnap かんたん請求_勤怠 - ceo-office - Slack 2023-06-20 19-29-27

メモ

どのスレッドかによって挙動がかわるのか、それとも、出勤はダメだけど退勤はいけるのかは確認できていない。

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.