Preventing food from expiring with two Siri Shortcuts

I have a bad habit of wasting food. I will buy groceries, eat most of it, but usually end up letting one or two things go bad just because I don’t think about it.

It’s probably because I don’t cook enough, but it’s still a problem I want to avoid with longer-term items who expiration dates I rarely think about when I buy them.

This is one of those things I genuinely try to work on, but every time I think about it I can’t remember when I bought or defrosted something.

So when earlier this week, the ground beef I had taken out of the freezer was no longer good, I got fed up with myself for doing it again and decided to change something.

So, I made two Siri Shortcuts for logging and checking expirations to make the process easier on myself, more reliable, and most of all: automated (because that part’s just fun for me too).

My expirations shortcuts

To help me avoid wasting any more food, I created two shortcuts: one for logging food and one for checking what food is expiring soon.

Both utilize Trello as a data backend, because I like to use drag & drop between columns to manage my inventory and see what food I have available to cook with.

On my Trello Board, I’ve separated out my kitchen into five columns for where the food is located, so I can keep track of whether something is in fridge, the fridge door, the freezer, my cabinets, or the pantry.

I initially used an earlier version of the below shortcut to speed up this process, using Dictate Text and Add to Trello as I stood in my kitchen, running the shortcut over & over to add each item and just changing the List when I was ready.

At the time I forgot to add the expiration dates, so I rebuilt the shortcut so I could add the proper as I went.

Grocery Expirations logger

The shortcut I landed on ended letting me quickly batch-add expirations in Trello and reminders the day before, letting me choose which list to add to, how many items to add, and whether to dictate or type them out as I go – it’s called Grocery Expirations.

Once I get my groceries and start unpacking them, I can then run this shortcut and follow guides steps to log everything quickly without thinking about it too much.

First, you will choose which section of the kitchen you want to approach first, using a List action with the corresponding categories and Choose From List to pick.

Then, you are asked how many items you want to log – that way you don’t have to start the shortcut over and over for each item, you can just guesstimate and go from there.

Once you’ve set the number, the shortcut then asks whether you want to Dictate or type your text – here the logic is saved and used again later, so you’re not making the same choice for every item.

Then, the Shortcut will start to repeat through the set number of items to be logged, and uses an If action to check whether you chose Dictation or typing and performs one of the operations. Here I’ll note – dictation doesn’t have a prompt, so you’ll just have to remember to speak the name of the item at that point (choosing Typing utilizes Ask For Input, which has a custom prompt to give that context).

Then, you’ll be asked to choose a date for when that item expires (which only works using the date picker, not dictation).

Then, Shortcuts will take that date, subtract one day, and then set a reminders letting you know the day before it expires. That way you have time ahead to eat it all up, instead of letting you know when it’s already too late.

Finally, the shortcut has the option to log all of those items into Trello. This portion I added in for my specific use case – I forgot to add expirations to groceries already in your kitchen system, so this can add reminders-only or add both a reminder and a Trello card for each new item.1

All together this lets me quickly capture and visualize my expiring foods, but also stay ahead of their expirations dates using reminders.

Checking expirations with Siri

For my second shortcut, I wanted a way to quickly look into my food system and examine all of those with expirations coming up soon or already expired.

For that, I created a shortcut called Check Expirations that pulls all the cards from those Trello lists, looks at the card due dates, and determines whether or not the item is expired.

I accomplished this by using Get Time Between Dates compared against the current date and checking the resulting value. If the value is negative, the item is past its due date; if it’s zero, then it expires today; and if it’s more 0, then it hasn’t expired yet.

Further, I don’t care if something is expiring way in the future and don’t want to list every single grocery item, so I set the shortcut with another condition for if the Time Between Dates is less than 4, then show the item, otherwise skip it and pass Nothing.

Using a series of If actions to set up these conditions (with some trial-and-error for sure), I ended up with a solution that works as intended. When I run the shortcut, it will pull anything expiring in the next 3 days or has already expired, grouping the items by their name and relative due dates and display them as a result.

Even further, this whole shortcut works from Siri because it doesn’t require any direct interaction, which means it works from HomePod and AirPods too.

Now that I have this set up with one trigger phrase across all my devices, I can easily be standing in my kitchen, shout out “What’s expiring soon?” and Siri will tell me exactly what I need to know.

A note on the setup

In the end, I actually combined the Check Expirations shortcut into the Groceries Expirations shortcut to make it a one-tap tool.

Running the shortcut lets you pick whether to Log Expiration or Check Expirations – if you choose log, it’ll proceed through, but Check Expirations will trigger a Run Shortcut action to run the Check Expirations shortcut itself, which I’ve kept stand-alone so it can still be added and run from Siri.

So download Check Expirations first, then get Groceries Expirations and follow the Import Question to select the first shortcut to run inside the second.

If things get confusing, I’ve added a Comment with the link to Check Expirations inside Groceries Expirations so you can add it again later if need be.

Expirations made easy

I’m excited to use these shortcuts as the basis for an overall food-tracking system to help improve relationship with my food. This will help keep unnecessary costs down, keep my tummy safe, and encourage more direct engagement as I’m getting groceries or planning meals.

In the future I want to generate grocery lists, categorize and compare prices of my purchases, find ways to pull from this Trello board while checking recipes in Paprika, and even quickly find alternate options when I’m out of something.

But for now, just a few steps at a time. Building piece-by-piece will let the system settle into place, and in the meantime, I have some food to cook up.

Get the shortcuts:


  1. I could have built this to pull the Trello cards and make a new one with the date for existing items, but I didn’t go through the trouble for this. If you want that version, let me know. 

One reply on “Preventing food from expiring with two Siri Shortcuts”

Comments are closed.