I’m not particularly superstitious, but recently everyone in my house has been having fun drawing a random tarot card from a deck as a ‘mood check’. It can be pretty entertaining, and confirmation bias has a great way of making your draw seem prophetic. On a lark I wondered if I could create a Notion database that draws a tarot card for me, and I did it! You can use the principle for all sorts of things, like perhaps a random quote, prompt, image, or really anything that can use a splash of randomness. I’ll also show you an alternate method using a date field that doesn’t refresh if you want to just schedule a quote of the day or something in advance.
The Tarot Card Database and Template
So, if you’re just interested in the Tarot Card database to copy it, you can find it here and the randomizer ‘helper’ database here. You’ll need both for it to work as described below, and may need to relate the properties after duplicating. I’ll run you through the process as well, if you want to learn how to make your own or modify it.
To build the database I mostly made use of a website which had Pamela Colman Smith’s illustrations from a 1911 book called The Pictorial Key to the Tarot, by Arthur Edward Waite. After saving all the images, titling them, and creating an inverted version of each, I dragged the lot into an empty Notion database, which populated the “Title” field with the file name and the body with the image. This was perfect for our purposes, because it made something that looks like this in grid view:
We are well on our way already! Consider that you could use the same method if you have a saved folder of any images, say if you wanted a random photo for your dash, but I digress. The next step was to cast about for a list of descriptions for the cards – each tarot card generally has a little set of associated words that give you a sense for what the card means, and I managed to find one here that I could port quite readily into excel, then copy and paste those values into the Notion table in an open text ‘Meaning’ field.
Now our little gallery can display the meaning underneath, by making it visible in the properties. This is already coming together as a nice reference document if, say, you use a physical tarot deck, but an additional feature I wanted was for Notion to ‘draw’ a random tarot card for me.
The Random Generator
The process of selecting a random item from a database is sadly a bit of an arcane process right now, but smarter people than me did some formula magic which gets you pretty close. Kudos to Matthias Frank for the random number generator I used for this Tarot card database – you can find his tutorial here if you want to understand how it actually works. In a nutshell, the method here is to use a formula to create an (effectively) random number which refreshes regularly.
So, create a formula field called Random Number and paste the following formula:
mod(mod(toNumber(slice(replaceAll(id(), “[a-z]”, “”), 0, 8)) * 1.00011979e+8 + 5.00067713e+8, 9.00066731e+8) * mod(timestamp(now()) * 8.00067089e+8 + 8.00068411e+8, 8.00053967e+8) + 9.00067309e+8, 9.00066571e+8)
This on its own is a fairly effective randomizer, and works quite well – if for example you just opened the gallery and sorted on that ‘Ranom number’ formula, it would sort in a new order every time it refreshed (every minute or two in my experience). So you could simply select the first card (or 5 if you want a spread) and use that as your ‘draw’. But what if you want 1 card (or image, or quote) that you’ve drawn, so that you can display it on a dashboard or home page? Well, that requires a little extra work, but it’s not too bad.
First, you’ll create a ‘Randomizer Helper’ database with one entry, ‘helper’, and a relation field to your Tarot database. Then, you’ll take every entry in your Tarot database and relate it to the Helper entry – all new entries will also want this relationship, so it pays to either make a default template or use a filter in your main view that does it automatically if you intend to be adding more items routinely. Once they’re all related, you will create a ‘Rollup’ field in your Randomizer Helper and select the random number field from your Tarot database, then instruct it to show the max number.
An annoying little extra step is necessary here, since you can’t easily fetch this rollup into the other database – first you need to create a formula which pretty much grabs the rollup’s value and displays it, a bit of a stopgap, but one you can then grab in your main database.
Nearly there! Your Helper is now fully configured, and the last few steps are done in your Tarot database, where you’ll now create a Rollup field (also called “biggest number”) to fetch the value from the formula you just made. You’ll notice your rollup field isn’t an option, which is why you needed to do the formula. Fetch that data, and then create a new ‘Formula’ field in your Tarot database called “Pick 1” and enter this formula:
prop(“Biggest Number”) == prop(“Random Number”)
As you might have guessed, this formula checks your item, sees if it matches the largest number, and if it does, it returns a checked box. If not, it doesn’t. Now you can filter on this formula to only show checked, and the result? A single item has been pulled from your random database and displayed.
Not an encouraging draw, but I’ll press on.
The date method
So there’s a different method, if you don’t want a constantly refreshing item but instead want one a day each day. This method also allows you to skip the extra ‘helper’ database – instead you’ll simple sort on your randomized number, add a date field, and then paste a list of dates that’s as long as your database. I used to do this before I found the above randomizer method by opening Excel, populating it with today’s date, and then dragging it down to autopopulate a few hundred entries so I had a solid stack of dates. I’d then import this sheet into Notion as a ‘dates’ database and copy the dates from there – the reason for the extra step is simply because I consistently had problems pasting dates directly into Notion from Excel, but if it works for you, you can just pick as many dates as you have items and paste them right in there. This makes less sense for the tarot cards (as you’ll run one at a time through the deck until you run out) but makes perfect sense for quotes or images as you won’t get any repeats until you’ve depleted your dates, at which point you’d just take a minute to ‘reset’ it with a fresh set of dates. Then, you can simply create a filtered view for “Date is: Today” and it’ll filter your item of the day.