List all line items containing a hashtag in a single note

What I’m trying to do

Hi all. I have a workflow where I used Drafts to create notes throughout the day, which I then append to my Daily Note in Obsidian later as bulleted line items. To make these quick notes useful, I tag them as I go, like so:

  • Random idea #writinginspiration #writing

What I’d like to do is figure out how to automatically collate these bulleted line items in master notes. So, for example, I could have a note that automatically gathers every bulleted line item across all of my daily notes that has #writinginspiration in it, and puts them in a list together.

Does anyone know how I could to this?

Untested query follows:

```dataview 
LIST item.text
WHERE file = this.file
FLATTEN file.lists as item
WHERE contains(item.tags, "#writinginspiration")
```