A simple Node app that uses the Google Chat API to send a daily message to any room that has a webhook defined for the purpose. https://glitch.com/~moodmarblesbot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
JayWll 59dbad74b8
Merge pull request #5 from JayWll/glitch
11 months ago
views 🐆👸 Updated with Glitch 1 year ago
.glitch-assets 🐆👸 Updated with Glitch 1 year ago
README.md Documentation update to add attribution to calendarific.com 1 year ago
app.js Removing some of the emoji from the mood marbles app reminder 11 months ago
package.json Adding time library to allow us to change the timezone 1 year ago
shrinkwrap.yaml Adding time library to allow us to change the timezone 1 year ago

README.md

Mood Marbles Bot

Mood Marbles is a popular mechanism for measuring the mood of agile squads. We use this app as an automated mechanism to post a daily message in our squad chat room and ask the team to respond with an emoji.

How Does This Work?

We use Google Chat. The Google Chat API includes an incoming webhooks feature that provides a simple mechanism for posting a message in a room. When you create an incoming webhook Google provides a unique URL for it, and this simple builds a message (based on the day of the week), formats the data appropriately into a JSON object, and sends it to the webhook in an HTTP request.

For our purposes, we publish the same message in two different Google Chat rooms. The webook URLs of these are stored in secrets.env:

AUTO_TEAM_URL="/v1/spaces/..."
FED_TEAM_URL="/v1/spaces/..."

The app identifies public holidays using an API from calendarific.com to fetch national and provincial holidays and check the current date against this.

How is This Triggered?

The app is triggered by cron-job.org. The job runs at 8:30am every morning. To prevent the messages from being triggered any other way, the HTTP request includes a custom header, moodmarbles-key, that the app checks. The expected value is also stored in secrets.env:

AUTH_KEY="..."