Skip to content

FrankLeeeee/Feishu-On-Leave-Status-Sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐧 Feishu-On-Leave-Status-Sync

中文 | English

💡 Motivation

When someone applies for a leave in Feishu, his/her status is not known to others unless they are explicitly mentioned. This script aims to solve this problem by automatically updating the on-leave status on Feishu.

This repository contains a simple script and a GitHub workflow definition to automatically synchronize the on-leave status on Feishu. The job will run periodically every 2 hours by default.

🛠 Usage

  1. Create a Feishu bot application on the Feishu Development Platform and enable the bot capability.

Create a Feishu bot application

  1. Get the App ID and secret.

Credentials

  1. Give the application the listed permissions.
  • calendar:timeoff
  • approval:instance

approval permission calendar permission

  1. You can run it locally or run it via GitHub Actions periodically.
  • Run locally
python main.py \
--app-id <app-id> \
--app-secret <app-secret> \
--hours 4 \
--approval-code <approval-code>
  • Run via GitHub Actions. You need to define the following action secrets.

GitHub Action Secrets

👀 Outcome

With this script, you can see the on-leave status on Feishu is synchronized automatically.

Feishu

About

This is a cron job which will periodically sync the on-leave status on Feishu.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages