How I created ‘Grocery List Bot’ the bot that share on Telegram Messenger your grocerylist

Marco Boretto
BotPublication
Published in
5 min readJan 14, 2017

After leaving my parents house, the need of organize grocery and other things concerning home suddenly became relevant: How to share the grocery list with my flatmates? How everybody can be aware of what is missing at home?

Furthermore I didn’t only expect to solve an organizational problem, but I also wanted to improve the process efficiency: In order to increase the speed-up at the grocery store, is it possible to have a dynamic list where everyone can interact?

But difficult questions are yet to come: which technology can I exploit to implement this shared list? I had some web development experience but I was (I am) completely fasting about iOS or Android development.

Developing a web application has the benefit that it can be used both on Android and iOS. But implementing this “app” on the web didn’t sounds good at all: you need to open the browser, login.. already too many steps. It was clear to me that it wasn’t a good start.

At the end of June 2015 a friend of mine told me:

‘‘Marco do you know that you can build bots on Telegram?’’

I replied something like:

“What?”.

Then we spend a couple of hours on a terminal to figure out how to work with the Telegram bot APIs.

“Don’t try this at home”

I took some days to realize that this instrument was exactly what I was looking for develop the shared grocery list!

Here are the benefits:

  • No authentication needed.
  • You don’t care about Android, iOS and friends; it works on Telegram!
  • Application integrated into a group chat: people can talk first and then interact and add remove things.

The name @listbot was already taken but @grocerylistbot was still available! Amazing! I developed the first prototype within a week, on July 3 2015 I submitted it on Storebot: Grocery List Bot was born!

Let’s do a step back!

Yes, I forgot to talk about the funny part: developing! From my side I had clear ideas: I wanted a Php library for those reasons:

  • The bot will be hosted on free webhost 😅
  • I’m a master with Php & Mysql! 😅

As you can imagine, everybody, after the Telegram Api release, start pushing on Github their wrapper to create bots. Among dozens, I found the Longman php-telegram-bot library.

It was in an embryonic state but I really liked it because of his command handling system. The code looked promising, but it wasn’t bug free. I started contributing with patch and little features meanwhile I built on top Grocery List Bot.

After two months of development I took over the develop of the library! I was very exited: for the first time I was in charge to drive the development of a piece of code useful for me and others.

Today the library has passed the Darwin selection: is among the most starred projects on Github concerning Telegram bot develop. I’m grateful to all the developers that helped me to test and maintain the code. Of course there is a lot that can be done to improve further!

Grocery List Bot Concept

What I learned developing Grocery List Bot is that you need to deeply care about User Experience. Here’s a list of rule that need to be followed if you decide to develop a new bot:

  • Keep it simple: forget to develop a bot that can do multiple things! Focus just on one task and do it well.
  • Create less commands as you can.
  • Chat first: people are on a messaging app to chat. Bot need to be quiet user that awake just if someone call them. A bot must work in private and group chat without interfere with the user conversation.

Here’s how I declined some choice into Grocery List Bot:

  • Keep it simple: One chat one list.
  • Less command as you can: /add and /remove are the only actions that let you manipulate the list. An update of a item can be performed as a combination of /remove and /add.
  • Chat first: The bot has no access to user messages and don’t send you reminders. By definition works in private, group and supergroup chats.

Outlook

On September 21 2016 the new version of Grocery List Bot has been launched (Try it!). The new version exploit Telegram Inline Keyboards, markdown and keeps track of the list during the migration to supergroups.

It comes also with a brand new backend that will let extend the service to other platform like:

  • Facebook Messenger
  • Slack

So Far So Good

Grocery List Bot is singularly focused on sharing and managing list on messaging platform, it does not have a legacy product to sell. For now it has reach a reasonable amount of user that legitimate the idea and the bot concept. Its vision of sharing list among chat is plausible and compelling.

We are all on the road to chat-bot and chat-commerce. Grocery List Bot could prove that is not easy to dominate and succeed in a world of bot and whether itself wins or loses, everyone will remember it as:

The first bot that helps you manage your grocery list!

Who is talking about Grocery List Bot?

I am going to list here some remarkable reviews made from some important italian newspaper. They made us feel proud of Grocery List Bot! Thanks!

--

--