Remember Grocery Bot

June 23, 2021

Inspiration for this project came when a close friend of mine raised the idea of having a shopping list on Telegram.

remember grocery bot showcase

After hearing this idea, I decided to take it further and create such a bot as it would give me an opportunity to explore with the Telegram Bot API's ability to add inline keyboard to messages. While developing, I explored with how to best edit or delete unnecessary messages to keep the interface clean and simple.

Google Cloud Functions was chosen as the deployment platform as I do not expect high traffic on the bot and users will not be making queries to the backend very frequently. In this case, a serverless platform like Cloud Functions will reduce the resources needed to keep the bot running. However, when running serverless, one challenge was to correctly parse callbacks called from the inline buttons. To tackle this, the state is stored in the database when users nagivate from one menu to another. This allows for the correct menu to be returned when the respective inline buttons are pressed.

Try out my telegram bot here: iangohy.com/demo/remember_grocery_bot