In this post, I’ll explain how to pull random blocks instances from your Roam Research graph, and output them automatically every day on your daily notes page (DNP).
Why we’re building this
I created this blog to highlight some of the cool things I’ve done with Roam and wanted to share with others in the community. I promise it will not just be a Tana feature comparison. That said, when you see something, say something:
What we’re building: Automatic, random block output in Roam
Alright, so we have something to aim at. Given we have a collection of People objects in our graph, we want to:
- Grab just one of those people at random
- Output that person *and* blocks referencing that person on the daily notes page (DNP)
- Run this workflow every day automatically, without any additional input once setup
Prerequisites
Before we dive in and build this thing, you will need to install the SmartBlocks plugin via the Roam Depot plugin manager. A quick diatribe, which you’re free to skip, for those “this is a hack” or “this feature is too important – I need it to be in core to rely on it” people…
- SmartBlocks is one of the ecosystem’s oldest, best-documented, and most well-supported plugins. At the time of this writing, it has more active users (5,972) than people in the entire Tana slack channel (5,300).
- What other system do you hold this “must be included in core” mentality? Do you only use Apple apps on your iPhone? Microsoft apps in VS Code? I didn’t think so…
- The entire SmartBlock’s repository is open-sourced. If you wanted, you could fork the entire repo today, make it your own and update it until the end of time.