I finally found a need for Shortcuts!

Since the Shortcuts app came out in (2017?) or at least, when Apple bought the indie app that it was formerly known as, I saw how useful automation could be. Problem being, nothing I saw really was necessary for me on my devices. I’ve even tried at times to browse Apple’s gallery but they seem more just good demos of what’s possible, versus things me or many people would probably use and depend on.

I recently got some new medication and it’s fixed my appetite and gotten rid of an issue that made me feel awful after eating not too much… so as well as logging medication, and my Apple Watch always monitoring my activity, and a HiDrate spark water bottle I bought to track water intake last year, I had the bright idea of logging food too.

The idea came as the HiDrate spark app charges you a yearly subscription to log anything other than water / tea / coffee / their branded energy drink. For anyone that doesn’t know, Apple sells a smart water bottle in its stores by a brand called HiDrate. It tracks your water intake. The height of absurdity? Some people online think so but it’s done wonders for me and reminding me to drink more water. I was a bit appalled that they have a £15 a year subscription though and they updated it so it shows all the locked fluids you can’t log on it for free.

I was also drinking things from bottles, cans, tea and that which I usually most days forgot to log manually on the Health app.

That’s when the light bulb moment happened. I created a Shortcuts section called Food Tracking. The first one is a Shortcut that allows me to log common drinks, not just ml unit measurements of water, but also sugar / caffeine. I even added each size of like Starbucks latte’s, Lucozade 380ml bottles and the likes. Now, one tap captures all of this on the Health app, joining the water tracking that HiDrate does automatically.

And then I thought, why not do this with the food I eat too? All the common stuff. First of all is one that just lets me add calories for things I don’t have programmed in (yet) or one offs. Then I added common quantities of things like meat, veg, fruit that I have daily. I’m adding these as I go along. The hardest was that Huel drink, it’s got like 26 nutrients / vitamins so typing them in is really really long, around 15 minutes per flavour / variety. I wish there was a faster way or a way to do this on Mac, but unfortunately not.

So if I could get this to work faster, in terms of programming in complex foods with a lot of different nutrient categories / vitamins that’d be great. But since it’s a one off thing per meal, it’s not too bad - long run it will work out fine.

Why not use one of the existing calorie tracking apps? Because these usually also want a subscription, feature annoying ads, but most of all are just plainly inaccurate. I’ll give you an example, one of the things I’d often buy is pastries from M&S bakeries - in-store, fresh kind. The nutrient info for this is missing from their website. Only sources online are the usual websites and apps that have their own databases of food nutrient data… I had to ask M&S and they sent me the info for one pastry and it was different to these other apps / sites that I now know just ‘guessed’… But also, it’s so cool to be utilising Shortcuts and another feature of my Apple tech. I can be flexibly about how I want to control and manage these shortcuts on widgets and via Siri and things like that.

Thought I’d share this. In my case it’s for weight gain but I’m sure this would be handy for anyone interested in or with a need to track food versus energy burnt.

As these are listed on their web site if it was me I’d be copying and pasting their ingredients lists from that page into whatever data file my Shortcut was using.

1 Like

Shortcuts (and that its interaction with other apps) is poorly documented by Apple. It requires us users to experiment within Shortcuts. This web page should help in that experimentation.

If you mean by “data format” the form in which shortcuts are stored on disk then I suspect you are on your own.

It would really help if there were a textual form of shortcuts that one could create/edit with simple tools rather than having to rely on the Shortcuts app itself to create them.

1 Like

I’d personally recommend JSON for this. Perhaps the Jayson app?

1 Like

With my (not-yet-in-Health-App) data in a Numbers spreadsheet on my Mac I would save it to XLS format then use CSV Kit components (csvkit 1.1.1 documentation) to convert XLS to JSON form then upload to the cloud (either iCloud or Dropbox) ready to use on my iPhone. Has the advantage that CSV Kit is free to download, free to use, and the conversion process doesn’t need a visual presentation plus I use CVS Kit extensively on other projects.

1 Like