From Manual Reminders to Automated Google Chat Alerts

Part 1: The Kingdom’s Communication Challenge – When Mahishmati Needed Automation
How Baahubali discovered that even a mighty kingdom needed a better communication system.
The Kingdom of Mahishmati Had a Problem
Once upon a time, in the mighty kingdom of Mahishmati, everything appeared to be perfectly organized.
Kingdom meetings happened on time. Soldiers reported for duty. Ministers attended their responsibilities, and the royal treasury maintained its records.
But behind this impressive administration, there was one problem that even the mighty Baahubali could not solve with his sword.
People kept forgetting their daily responsibilities!
Every morning, the kingdom’s soldiers needed to report their attendance. The ministers had to update their daily work records. The commanders needed to communicate their progress, and at the end of the day, everyone had to ensure that their responsibilities were properly recorded.
Unfortunately, the royal administration depended heavily on manual reminders.
Kattappa had to remind the soldiers to report for duty. Devasena had to follow up with the ministers about their daily activities. Sivagami wanted regular updates about the kingdom’s progress.
And Bhallaladeva? He was never happy when reports arrived late!
One morning, Baahubali noticed that the same reminders were being repeated every day.
He asked Kattappa:
“Why must we send the same message every morning? Why can’t the kingdom remind everyone automatically?”
Kattappa thought for a moment.
“Perhaps, my lord, we need a system that works even when nobody remembers to send the message.”
And that was the beginning of a new initiative in Mahishmati.
The kingdom needed automation!
# Chapter 1: The Royal Communication System – Google Chat
Baahubali gathered his technical advisors and proposed a simple idea.
Instead of sending individual messages to every soldier and minister, the kingdom would use one central communication platform.
That platform was Google Chat.
The royal administration already had a dedicated Google Chat space where team members could communicate, share updates, and discuss daily activities.
However, communication alone wasn’t enough.
The kingdom needed scheduled notifications.
Baahubali wanted a system that could automatically send messages at predefined times without requiring someone to manually post them.
The technical advisors proposed using two components:
– Google Apps Script: To execute the automation logic and manage scheduled notifications.
– Google Chat Incoming Webhook: To deliver automated messages directly into the designated Google Chat space.
The idea was simple.
Google Apps Script would act as the royal messenger, while the Google Chat webhook would act as the communication gateway.
Whenever a scheduled event occurred, the script would prepare a message and send it to the kingdom’s Google Chat space.
No messenger needed to run across the palace every morning!
# Chapter 2: The Royal Messenger – Building the Automation
Kattappa was appointed as the royal administrator responsible for the communication system.
He started by creating a Google Apps Script project.
The first requirement was to connect the script to the existing Google Chat space.
For this, an incoming webhook URL was generated from the space’s integration settings.
The webhook URL acted as a communication endpoint. Whenever the script sent an HTTP POST request to this endpoint, Google Chat received the message and displayed it in the selected space.
The implementation used JavaScript and the UrlFetchApp service provided by Google Apps Script.
A simplified example looked like this:
js
function sendChatMessage(message) {
const webhookUrl = "YOUR_GOOGLE_CHAT_WEBHOOK_URL";
const payload = {
text: message
};
const options = {
method: "post",
contentType: "application/json",
payload: JSON.stringify(payload)
};
UrlFetchApp.fetch(webhookUrl, options);
}
Now Kattappa had a working communication channel.
He tested it by sending a simple message:
“Greetings, Mahishmati! The royal communication system is now operational.”
The message appeared successfully in the Google Chat space.
Baahubali was pleased.
But he had a bigger requirement.
The kingdom didn’t need random messages. It needed reminders at specific times throughout the working day.
And that was when Sivagami introduced her first royal order!
What Comes Next?
In the next part, Sivagami, Baahubali and Devasena will introduce three important announcements to the kingdom.
– The morning Odoo update.
– The clock-in reminder.
– The evening clock-out and Odoo update.
To be continued: Part 2 – The Three Royal Announcements.
