Simple Slack bot to annoy Oriflame teammates with regular worklog agenda.
nvm use
yarn install
This app is deployed to Google Cloud Run
via Deploy action on push to main
branch.
After each deployment two parallel processes are started with yarn start
:
- app (
yarn start:app
) – bot worker that runs messaging schedule every day at specified time - server (
yarn start:server
) – public web just for the funsies
To save as many resources as possible, the Cloud Run instance auto-scales to 0 and idles when inactive. For this reason, a Cloud Scheduler job is created to wake OriBot up every day at 9:55 AM (Europe/Prague).
🧠 Do not forget to update the schedule based on the configuration below.
The app uses .env
config which is based on .env.example
:
CHANNEL_ID
– Slack channel ID for messagingClOSURE_DAY
– day of month on which the worklog agenda closes (defaults to25
)DEBUG
– set1
to disable sending messages and only output to console (defaults to0
)DEBUG_DATE
– whenDEBUG=1
use this to simulate a specific date for test run (defaults toundefined
)JOB_HOUR
– hour at which the messaging schedule runs daily (defaults to10
)JOB_MONTH_END
– month in which the messaging schedule ends (defaults to11
)JOB_MONTH_START
– month in which the messaging schedule starts (defaults to2
)PORT
– port on which the public web is served (defaults to8080
)TOKEN
– Slack OAuth token for ApiTree workspaceTZ
– timezone to be used for dates and times (defaults toEurope/Prague
)
⚠️ Values forCHANNEL_ID
andTOKEN
are mandatory and stored in the Secret Manager.
ℹ️ Right click on channel name in Slack and use
View channel details
to find channel ID.
🎄 By default, December and January are skipped in schedule due to end-of-year specific closure.