{"id":20348536,"url":"https://github.com/onebeyond/bamboohrbot","last_synced_at":"2025-04-12T01:15:58.291Z","repository":{"id":114948352,"uuid":"583305387","full_name":"onebeyond/bamboohrbot","owner":"onebeyond","description":"🤖 Bot to publish BambooHR notifications (company holidays, work anniversaries, birthdays, and who is at the office) to slack each weekday.","archived":false,"fork":false,"pushed_at":"2025-02-24T10:20:23.000Z","size":1771,"stargazers_count":4,"open_issues_count":16,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-12T01:15:53.110Z","etag":null,"topics":["bamboohr","hacktoberfest","serverless","slack","slackbot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onebeyond.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-12-29T11:33:37.000Z","updated_at":"2024-11-27T08:45:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"95f95c4e-90bc-41fc-81c6-1fb7ff61660b","html_url":"https://github.com/onebeyond/bamboohrbot","commit_stats":null,"previous_names":["onebeyond/bamboohrbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onebeyond%2Fbamboohrbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onebeyond%2Fbamboohrbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onebeyond%2Fbamboohrbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onebeyond%2Fbamboohrbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onebeyond","download_url":"https://codeload.github.com/onebeyond/bamboohrbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501859,"owners_count":21114684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bamboohr","hacktoberfest","serverless","slack","slackbot"],"created_at":"2024-11-14T22:21:07.702Z","updated_at":"2025-04-12T01:15:58.262Z","avatar_url":"https://github.com/onebeyond.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bamboohrbot\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/onebeyond/bamboohrbot/actions/workflows/test.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/onebeyond/bamboohrbot/actions/workflows/test.yml/badge.svg\" alt=\"run-tests workflow\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/onebeyond/bamboohrbot/actions/workflows/main.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/onebeyond/bamboohrbot/actions/workflows/main.yml/badge.svg\" alt=\"deploy-to-aws workflow\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/onebeyond/bamboohrbot/maintainability\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/2cb9384daf04fc540596/maintainability\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/onebeyond/bamboohrbot/test_coverage\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/2cb9384daf04fc540596/test_coverage\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/github/all-contributors/onebeyond/bamboohrbot?color=ee8449\u0026style=flat-square\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/all-contributors/onebeyond/bamboohrbot?color=ee8449\u0026style=flat-square\" alt=\"all-contributors\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n🤖 Bot to publish BambooHR notifications to slack each weekday:\n\n- Who's at the office\n- Birthdays\n- Work anniversaries, including a welcome message on the first day\n- Company-observed holidays\n\n## ⚙️ Setup\n\n- Clone the repository and run `npm install`.\n- Ensure your [AWS credentials are available](https://serverless.com/framework/docs/providers/aws/guide/credentials/).\n- If you have access, generate a [BambooHR API key](https://www.bamboohr.com/api/documentation/) within your account. Otherwise, have a BambooHR admin at your company generate one for you.\n- Determine the BambooHR subdomain associated with your company.\n- [Create a new app](https://api.slack.com/apps) on your slack organization, give it the `chat:write` and `chat:write.public` scopes, and [install it](https://api.slack.com/start/quickstart#installing) to your workspace.\n- Once deployed, it will run from Monday to Friday at 7 a.m. UTC. This can be adjusted in `serverless.yml` file.\n\n### Environment variables\n\nThe service needs the following env variables:\n\n```\nENVIRONMENT=\nAWS_ACCOUNT_ID=\nAWS_ACCESS_KEY_ID=\nAWS_SECRET_ACCESS_KEY=\nBAMBOOHR_SUBDOMAIN=\nBAMBOOHR_TIME_OFF_OFFICE_CODE=\nEMPLOYEE_COUNTRY_FILTER=\nSLACK_CELEBRATIONS_CHANNEL_IDS=\nSLACK_BANK_HOLIDAYS_CHANNEL_IDS=\nSLACK_OFFICE_CHANNEL_IDS=\n```\n\nTo run it locally, you can create an `.env` file. To deploy it in the cloud, you need to define them in the CI/CD pipeline, as they are read in the GitHub action that deploys it to AWS.\n\nApart from the env variables, it will read the `BAMBOOHR_KEY`, `SLACK_SIGNING_SECRET`, `SLACK_BOT_TOKEN` secrets from [AWS Secrets Manager](https://aws.amazon.com/en/secrets-manager/).\n\n## 🗒️ Usage\n\n### Deployment\n\nIn order to deploy the code, you need to run the following command:\n\n```\n$ serverless deploy\n```\n\n### Invocation\n\nAfter successful deployment, you can invoke the deployed function by using the following command:\n\n```bash\nserverless invoke --function main\n```\n\n## 🏗️ Local development\n\nFirst you need to create an `.env` file with the following variables:\n\n```\nENVIRONMENT=local\nAWS_ACCOUNT_ID=\nBAMBOOHR_SUBDOMAIN=\nBAMBOOHR_TIME_OFF_OFFICE_CODE=\nEMPLOYEE_COUNTRY_FILTER=\nAWS_ENDPOINT=http://localhost:4566 # Localstack\nAWS_REGION=us-east-1 # Localstack\nSLACK_CELEBRATIONS_CHANNEL_IDS=\nSLACK_BANK_HOLIDAYS_CHANNEL_IDS=\nSLACK_OFFICE_CHANNEL_IDS=\n```\n\nApart from that, you need to create an `.env` file inside the `docker` folder with the following env variables:\n\n```\nBAMBOOHR_KEY=\nSLACK_SIGNING_SECRET=\nSLACK_BOT_TOKEN=\n```\n\nAnd the run [localstack](https://localstack.cloud/) with an instance of AWS Secrets Manager by typing:\n\n```bash\nnpm run infra:dev:start\n```\n\nYou can invoke your function locally by using the following command:\n\n```bash\nserverless invoke local --function main\n```\n\nWhen you're finished, remember to run:\n\n```bash\nnpm run infra:dev:stop\n```\n\n## 🔗 Useful links\n\n- [Slack Block Kit documentation](https://api.slack.com/block-kit)\n- [Slack Block Kit builder](https://app.slack.com/block-kit-builder)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/inigomarquinez\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/25435858?v=4?s=100\" width=\"100px;\" alt=\"Íñigo Marquínez Prado\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eÍñigo Marquínez Prado\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/guidesmiths/bamboohrbot/issues?q=author%3Ainigomarquinez\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/guidesmiths/bamboohrbot/commits?author=inigomarquinez\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/guidesmiths/bamboohrbot/commits?author=inigomarquinez\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#infra-inigomarquinez\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"#maintenance-inigomarquinez\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/guidesmiths/bamboohrbot/pulls?q=is%3Apr+reviewed-by%3Ainigomarquinez\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"https://github.com/guidesmiths/bamboohrbot/commits?author=inigomarquinez\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/totegsito\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/12380342?v=4?s=100\" width=\"100px;\" alt=\"Fran Quesada\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFran Quesada\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/guidesmiths/bamboohrbot/issues?q=author%3Atotegsito\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/guidesmiths/bamboohrbot/commits?author=totegsito\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/guidesmiths/bamboohrbot/commits?author=totegsito\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-totegsito\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/guidesmiths/bamboohrbot/pulls?q=is%3Apr+reviewed-by%3Atotegsito\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Betisman\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/11455322?v=4?s=100\" width=\"100px;\" alt=\"Carlos Jiménez\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eCarlos Jiménez\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/guidesmiths/bamboohrbot/pulls?q=is%3Apr+reviewed-by%3Abetisman\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/w3dani\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/48931264?v=4?s=100\" width=\"100px;\" alt=\"w3dani\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ew3dani\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#infra-w3dani\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"https://github.com/guidesmiths/bamboohrbot/pulls?q=is%3Apr+reviewed-by%3Aw3dani\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonebeyond%2Fbamboohrbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonebeyond%2Fbamboohrbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonebeyond%2Fbamboohrbot/lists"}