I Automated My Health and Menstrual Trackers with Google Sheets and Python
Amenorrhea healing journey
In this post, I speak about:
my amenorrhea recovery
my past restrictive eating
why I created the trackers
why I chose not to use the apps from the market
why I, with my restrictive eating history, track my nutrition
the help from AI in estimating nutrition and coding
Lovelies,
I’m back after a couple of months not posting anything on Substack.
I was finishing Arc 1 of my novel, which I will talk about in another post. For now, I’d like to share with you my healing journey from amenorrhea.
Amenorrhea is the absence of period for more than 3 consecutive months in an otherwise healthy, regularly cycling woman. I had that for 13 months, so just over a year. I recovered briefly in the middle of it, but then lost my period again from July 2024 until February 2025.
Praise the Lord, I’ve regularly cycled since then, and in July 2025, I had my sixth recovery cycle. My cycle is normalising over the months, so the length became more regular at 27 - 29 days.
Here are a few reflections I posted over the years about this issue.
(Or me deep in a restrictive mindset trying to figure out why my period went missing, duh - I should start a collection of posts written when I was deep in ED)
Friends,
I used to think (and spoke to doctors about it) that it could be because of autoimmunity, mainly because the symptoms presented like those with autoimmune diseases, such as chilblains, livedo reticularis (spiderweb veins), and amenorrhea.
Without delving into my investigation journey, I came to the hard, bitter truth of the conclusion that I was suffering from undernourishment.
The solution was not to cut more and eat less, but to eat more.
Like . . . way more.
Funnily enough, as I was desperate to start my all-in journey, I borrowed the No Period Now What book from my local library (Aberdeen Central Library), to support me mentally that what I was doing was not insane.
From my glucose dropping to my suspiciously increased cholesterol level during the deep winter months, I attributed them to my being undernourished, which disrupted my hormones. This is because, scientifically, hormones govern a whole lot of bodily functions.
(Note: I haven’t tested my cholesterol level yet, but my glucose stabilises after I eat regularly)
We were taught that sugar and UPFs are bad, but nobody told me that my orthorexia could be a silent killer
Embarking on the all-in journey was a leap of faith. When restricting even more led to a worse outcome, there was no harm done if I swung in another direction.
I increased my calorie intake - I didn’t track them, because I was simply in the Extreme Hunger (EH) period.
Like chronic illnesses, amenorrhea doesn’t develop overnight. It’s a tipping point after years of restrictive eating habits. I cried over and over upon learning I brought this upon myself, because I followed the “clean eating” which was supposed to be innocent, but was prone to develop into disordered eating in vulnerable individuals.
My personality and life history darkly twisted the healthy attempts into a restrictive mindset over the years.
I felt slapped when the recent trend thankfully embraces the body recomposition practice instead of simply cutting, and that extreme, chronic restrictions will backfire instead of helping achieve a certain goal.
When someone (a fitness coach) said bluntly on her video:
So you cut, cut, and cut, until you eat air?
Or a bodybuilder who knows the importance of nutrition said in her video:
I did a mini-cut for 2 weeks, and my basal body temperature has decreased to 36.1 °C, so my metabolism has slowed significantly - I need to increase my intake.
I was gutted. Because what I did for five years was cutting my intake even lower when I stopped seeing results (plateauing). My BBT was so low, 35.6 - 35.7 °C, so a little infection could send me to the hospital because of fever, which I experienced in Jakarta during a short break in 2023.
An analogy for amenorrhea is a depleted account - you keep making withdrawals from your bank account but not depositing more money; at some point, you’ll see a negative balance.
In bodily functions, the insufficient energy balance (called Low Energy Availability - LEA) manifests in slowed metabolism in women, with the physical symptoms ranging from:
lower body temperatures
cold hands and feet
bad circulation - I suffered from unhealed bruises and chilblains in the winter months because my body struggled to keep warm in the core, so bye-bye farther body parts like fingers and toes
getting prone to infection - because you don’t even have enough fuel to maintain normal functions, let alone fight infections
no period
It’s a survival mechanism, really. Your body is intelligent; it prioritises the basic survival functions like your heart and lungs. Even digestion can slow down - I still have gut sensitivity in motility due to hormonal changes, which I remember I never had before my restriction.
I’m still grateful I’ve recovered. One thing I noticed from my scale data is the increase in my bone mass.
This is why orthorexia can be a silent killer because it can tip into the danger zone of malnutrition, in which a lower bone mass can lead to osteoporosis. Also, the organs may suffer from the shrinkage, which affects how they support your life, such as your heart muscle needs fuel to be on tiptop cardiovascular health.
In short, when you suffer from amenorrhea, it’s not “just” about “yeay, no period”. No, absolutely not.
Female hormones govern a vast array of bodily functions. And so, when the symptom is crystal clear that you can’t menstruate, it’s the tip of the iceberg you must investigate.
Sadly, doctors (in my past GP, at least) brushed this off as I was not trying to conceive (TTC).
While no menstruation indicates you’re not ovulating, hence, something you don’t want when you’re trying to get pregnant, the fact that your body fails to run a normal function requires further investigation.
Thankfully, the remedy sounds indulgent: eat more and rest more to replenish the energy balance.
However, this is exactly why it’s difficult for patients with ED history to recover. They see eating as evil. In my case, sugar was the enemy, and UPF was polluting my body. And don’t tell me not to exercise - are you getting me obese?
I tried reframing this as food and no exercise are my medicine, same like how people have to take pills to help the body recover from an illness.
My mental journey was difficult:
panic attack because of palpitations at night - I never ate more than enough, so eating more caused palpitations
drop in confidence because of weight gain
months of uncertainty because I filled out
and battling with the idea that gaining weight means a shorter path to heart attack and stroke
I will share more about my mental journey in another post.
Conscious, body-compassion tracking instead of restrictive tracking
Since cycle #2, I’ve picked up my dumbbells again. Cycle #4 saw me start the food tracking again. Only, this time was not to ensure I ate a maximum of 1,500 kcal (I know, it’s insane, but my mind was unhealthy back then). Instead, I ate until satiated and tracked the data points for one whole cycle to support my data-driven decision-making.
In Cycle #5, I started the body recomposition journey for fat loss.
Ironically, body recomposition doesn’t require a dramatic cut in my case. In fact, I need to ensure my daily intake hovers between 2,000 - 2,100 kcal, which is manageable, satiating, and healthy. I can still have peace of mind about eating “clean” while having snacks or treats here and there.
I’ve learned my lesson that cutting too much for too long will backfire by slowing down metabolism, which will make fat loss impossible. And so, I learned to notice my body signals when my intake has been lower.
Therefore, a food tracker is important.
Here’s my scaffolding. I added Automator from macOS so that I don’t need to open my VS Code to run the script every time, and GitHub cron so the automation can run in the cloud without my triggers.
The philosophy is to eat to nourish one's body, not to starve for ✨aesthetics✨.
💕Goals of the tracker💕
It keeps logs of WIEIAD (what I eat in a day) to calculate the calories and macros. I calculated my TDEE and macros suggestion. Instead of approaching it with the old rigid mindset, I now see it as the average values.
It keeps logs of the types of exercise I do each day. I quite like walking and weightlifting, so I just track the bare minimum of them - the number of steps and if I do them in a day, without getting obsessed with numbers.
And with my cycle phase as well to see if I accidentally starved myself again, especially during the follicular phase where appetite is lower.
VUCA-conscious business analysis
💕Why I don't use the available apps in the market💕
I'm not lazy, I'm just VUCA-conscious, which is my life motto.
I'm not lazy, I'm just VUCA-conscious
(VUCA: Volatility, Uncertainty, Complexity, Ambiguity)
If the tools I can develop on my own (with the help of various AI chats about coding and all the techie stuff) solve my problem, why would I bother with the numerous apps in the market not tailored to my needs?
This is precisely why I fell into the trap of restriction: trying to fit my body goal into the Lean/Athletic body fat percentage from the research developed not on my demographic. US Navy body fat % says I should have body fat in the range of X-Y% to be called Lean. I strived to fit into this category, sacrificing my health in the process.
So, regarding the tools: trying to fit into something not built based on my needs? Yeah, no thanks, been there, done that.
To elaborate, here are my reasons.
1. Digital minimalism
I benchmarked several nutrition tracking apps ca. 2022. Although some of the apps cater to the UK-based users with good feedback from users saying many supermarket items are available in the app, I don't want to use them this time around. I don't feel the appeal of downloading and using another app on my phone.
2. Cautious of harmful messages in those apps
I have an app on my phone that's specific to the body composition scale I use (I don't weigh myself daily, only weekly or fortnightly for data tracking). The app literally has comments such as "high body fat", or body type "muscle fat", and so on. That's discouraging and can tip me back into my old restrictive lifestyle if my mental foundation is wobbly. Thankfully, my mind is strong enough to ignore those messages. I still keep the app as I need it to use my scale. But for the nutrition and cycle tracking, I don't need to expose myself to risky messages.
3. I'm a system thinker, I know my stuff in spreadsheets, and I can code Python. I'm a system thinker, I was trained as a product manager and work as a business analyst. So I'm familiar with users’ pain points and solution proposals (and Agile methodology LOL). So for me, defining my personal problems and creating solutions are not difficult. I can code Python as well. It makes more sense to me to build the entire system from just Google Sheets, its API, and Python, rather than having to download two different apps and STILL missing some key features I wished they had.
Finally, a million-pound question:
😱Why would someone with a restrictive eating history track their nutrition?😱
Isn't that exactly what they're advised against?
I track because:
1. This is my second life. Instead of using a tracker as a tool to restrict, it's a tool to gather data. Tool neutrality. I didn't get it right the first time around; I want to teach myself well this second time.
2. I'm a data thinker. The same mindset that drove me into restriction can help me sustain an active, nourishing lifestyle. The only thing my brain needs is honest data.
3. Tracking is not equal to restriction. It's about the intention behind it. Everyone's history is different. I like to be intentional and body-aware. Even with tracking, I keep my cycles regular. I learn to know what my body needs, the 'safe zone' for exercising and nourishing my body. This means the tracking itself is not evil, but restricting is.
Leveraging AI
I use AI for two reasons.
#1 - AI for estimating calories and macros: I upload the pictures and (if I managed to weigh the food) the weight or dimensions
For example:
#2 - AI for coding: Python, API connection, and Git
With AI, like ChatGPT and Claude, which I used for this automation, everybody can code. I know Python, but it doesn’t mean I code from scratch successfully, as AI can do the scaffolding and I adapt it into the script I need.
From my design of my automation, I typed my prompts to make this happen.
It’s how I envision AI in the near future:
Product development becomes a personal project. No more thinking: is there an app to do that? Because you can create your own system. With only Google Sheets API and Python, my entire system is operational.
Delegate the codifiable tasks to AI - you do the heavy-lifting of system thinking: defining how the system should work for you, tidying up the loose ends - and AI will translate them into code.
Over to you
Now, I invite you to hop over to my GitHub. If you’re keen to download my repo and adjust the code yourself, be my guest.
If you’re not comfortable coding, you can head over to the readme file and see the logic of how I built this automation and adapt it into Google Sheets or any tracking methods you prefer.
Let me know what you think. Happy to take your questions 🙂
P.S., regarding my healing journey, now I’m in a position to be more candid. So, what topics do you want me to write about? Tell me and I’ll schedule it in my next posts.