Giter Club home page Giter Club logo

line-leave-punch-bot's Introduction

Line Leave/Punch Bot

以 Line Bot 和 Google Sheets 的一個輕量型請假/打卡機器人

This is a lightweight leave/punch bot using Line Bot and Google Sheets

Features

  • 透過特定格式進行員工請假 (可彈性客製化)
  • 使用 Google Sheets, 做為免費且輕量的資料庫
  • 使用 Google App Script, Line Bot 文件充足且可快速使用

Usage

  • 透過簡單的文字訊息即可建立請假,並新增資料至 Google Sheets

請假機器人

Line Message

    姓名:員工
    日期:09/26
    假別:事假

Google Sheets 資料 (會依據月份建立 Sheet)

員工 日期 假別
員工 09/26 事假

打卡機器人

Line Message

    姓名:測試
    上班:09:00
    下班:18:00
    日期:09/25 (Optional)

Google Sheets 資料 (會依據月份建立 Sheet)

姓名 日期 上班 下班 純工時 勞基法工時
員工 09/26 09:00 18:00 9 8

Development

  • app.js 的內容,複製到你的 Google App Script
  • CHANNEL_ACCESS_TOKEN 裡填入你的 LINE API Token
const CHANNEL_ACCESS_TOKEN = '{{ Your Token }}';
  • 更改 Google Sheets 資訊:
const sheet_url = '{{ Your sheet url }}'
  • 選擇你要使用的機器人:
const bot = new LeaveBot() || new PunchBot();
  • App Script 存取權限改為「所有人」後部署 (網路應用程式):
  • 將產生的網址(網頁應用程式)複製至你的 Line BotWebhook

Customization

reply_message 必須為 JSON 格式,範例如下:

   const reply_message = [{
       "type":"text", 
       "text":" {{ 文字內容 }} "
   }]

可參考 Line 官方文件

License

MIT License.

line-leave-punch-bot's People

Contributors

kazenoyumex avatar

Stargazers

 avatar

Watchers

 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.