How would I go about recreating a "Next Events" type widget?

Looking to create a dynamic # of badges based on data, each of which have their own action associated on tap.

Not sure what the best way to go about this is. I don't know AppleScript but I can learn. Very comfortable w/ Node, but haven't found a way to create multiple elements in BTT.

Thanks!