Automatically add working hours of an employee in BambooHR
My company stopped using BambooHR so this project is not maintained anymore
The company I'm currently working for requires to fulfill a form every day of the month with the amount of hours worked in BambooHR platform. This is due the new law the Spanish government created a few months ago. Apparently BambooHR plugin to add Working Hours does not offer settings to automate or add by default values to this form.
I first tried to interact with BambooHR API but it requires a Private Key which is not possible to be provided by my current company right now.
That's why I opt for a headless solution to add the manual interaction a user would do so it can be automated.
- TypeScript
- GitHub Actions
- from Monday to Friday at 8am (GMT)
- Puppeteer
.github/workflows/bamboohr-puppeteer.yml
: Simulate UI interactions with BambooHR UI through headless browser solution (Puppeteer)src/index.ts
: File run by Puppeteer to interact with BambooHR UI site to finally register Working Hours on BambooHR's Working Hours Pluginsrc/bamboo-hr-interactions/*
: Different interactions taken over BambooHR UI Components with Puppeteer (click, type...)
-
Fork this repository in your GitHub Account *
-
Add the following KEY-VALUES as secrets on the repository you plan to run this Github Action:
COMPANY_BAMBOOHR
: Company's subdomain under BambooHR to access your company's BambooHR site: https://<COMPANY_BAMHOOHR>
.bamboohr.comUSER_BAMBOOHR
: BambooHR's Username of the employee you want to automate his/her working hoursPASSWORD_BAMBOOHR
: Password associated to previous username
-
Wait until next working day (Monday-Friday) at 8AM GTM** to get GitHub Action automatically triggered
**You can find online converters from your local time to GTM. Also, at www.google.com you can just type: "gmt convert" and magic will happen 😎