How a data analyst built a smart habit tracker using Baserow

Build a bot that helps building habits with Baserow

In February of last year, a friend convinced me to take on a rather unusual challenge for an entire month: I would act as if I was receiving a specific sum of money daily. This sum would double each day, starting with an initial amount of €1000.

So, by February 28th, I would have (virtually) received approximately €134,000,000,000, calculated as 1000 × 227 ≈ €134,000,000,000.

The purpose of this exercise is to shift from a mindset in which you constantly tell yourself to chase after more money (referred to as the “rat race prophecy,” as vividly illustrated in the short animated video by Steve Cutts) to a state of mind where you already possess that money and are contemplating how to use it.

The exercise itself may seem impractical and time-consuming. But we were four friends doing this at the same time, so I saw it as an opportunity to build something meaningful. I imagined a solution that would not only make this daily routine simple but also add an element of fun to the process.

Image on how to build a bot that helps build habits with Baserow

Prerequisites

To follow along, you’ll need the following to build a habit tracker:

  • A Baserow hosted or self-hosted account.
  • An automation tool, e.g. n8n, Zapier, or Make.
  • A communication platform, e.g. Telegram, or Slack.

Building a simple tool to track our spend

As we started this challenge, we had this question on our minds: "What’s the best way to keep track of all our purchases and the fun activities we’d do with our fictive cash?”

We had the following specifications:

  • Ergonomy: The platform for storing our data should be as user-friendly as possible to enable people to get started quickly, allowing non-technical individuals to easily log daily what they would buy.
  • Privacy: Within our friendship group, everyone was willing to share what we wanted with each other. However, none of us wanted non-privacy-respecting companies to store this data. In short, we ruled out Google Sheets and Airtable.
  • Features: We wanted the possibility to display all necessary data and keep a log of how much we spent daily, and how much we had left to spend.
  • Interoperability: Finally, the software should be easily integrated with automation tools. Therefore its API should exist, be complete, and be easily understandable.

You guessed it, Baserow won the race by far. As I was quite motivated by this challenge, I spent a few hours building a database with necessary fields, views, and tables and thinking about coupling it with other tools.

I finished setting up a system composed of 3 tools to settle this friend challenge:

  • Baserow, for data storing and management.
  • n8n, pronounced ‘nodemation’, an open-source alternative to Zapier for creating automation workflows.
  • Telegram, our chat platform that would serve as a communication channel for our internal discussions. It would also serve as a diffuser for automatic messages, as we’ll see in the schema below.

I arrived at the following workflow:

graph TD
    subgraph "In the evening"
        BSR2(Baserow)
        N8N2(n8n)
        CHAT2(Telegram)
        N8N2 -->|1. Every day at 23:59| BSR2 -->|2. ... recover what participants have made...| N8N2
        N8N2 -->|3. ... and send a recap message to all participants.| CHAT2
    end

    subgraph "In the morning"
        BSR(Baserow)
        N8N(n8n)
        CHAT(Telegram)
        N8N -->|1. Every day at 8:00| BSR -->|2. ... recover current day amount...| N8N
        N8N -->|3. ... and inform participants.| CHAT
    end

Here are some examples of the tables:

Baserow dashboard

Main view for a summary of players’ actions.

Baserow dashboard of things purchased

Things view for a description of items “bought” by each of us.

I set up the automation on n8n so that every morning, we would receive a message outlining what we needed to spend and a link to the database to input our ideas. Every evening, we would receive a message detailing what we spent. This sparked engaging conversations among us.

Baserow n8n automation

The future challenge

One month after we completed this challenge, I read some books about habits — those small actions we take daily almost instinctively without thinking about it. I wondered how to incorporate positive habits that could improve my daily life.

I had an aha moment, realizing what I did previously could tremendously help me.

As I wanted to run a marathon, I took a training program and repeated the same steps I did with my previous experience:

  1. Set up a Baserow database, that has two tables:
    1. Table A: stores the miles I planned to run each week.
    2. Table B: stores a list of all runs I would make, with a simple form view for easy data entry.
  2. Configure n8n to send a weekly message, every Monday. This message would include my weekly running distance goal and a public link to the form to record my run.
  3. Configure n8n to send me a message every Sunday, with a summary of my weekly running activities, and a specific message depending on whether I succeeded or failed.

Conclusion

Habits have gained a lot of attention in recent years. When you couple them with an automation tool and communication software, setting up such a project can be quite promising. When you think about all the changes you want to make (or let go of) in your life, from that moment this habit can be virtually tracked. The possibilities are endless.

Here are a few ideas:

  • Building a daily log habit: You receive a message every day at sunset, prompting you to write about the previous day’s experiences. Filling up a Baserow form will send you a message with the number of words you made, and how you’re progressing this week.
  • Twitter-cooler-bot: A bot that gathers the number of tweets you made, and sends you a tailored message depending on the time you spent on the application. Baserow will serve as a database to store your progression.

As we can see, the possibilities are quite endless. The features that a no-code database like Baserow gives you are well developed that you’re all set up in a few minutes (no kidding), and branching with automation tools is easy as well.

In my case, I used an existing Baserow operation to recover the amount for the current day and what participants made at the end of the day:

n8n Baserow operator

The architecture may not be as good as it could be. You could think of many improvements:

  • Changing software: For instance, I used another more privacy-respecting chat tool, Element, instead of Telegram for my running bot.
  • Adding a reward system to keep motivation high.
  • Changing the frequency of sent messages.

In short, the best habit-bot will be the one that works for you. Happy Baserow-ing!

If you have any questions, feel free to reach out and ask for help in the Baserow community.

Other useful resources

The following articles may also be helpful:

Create a Baserow account