Dynamic generation of content based on things data

Context: I’m trying to generate a long page of text to be used for show notes for a podcast. Currently, I’m solving this by using bubble as the frontend to create the data for each podcast episode, and then converting the data to json and locally using handlebars to populate a template based on the show notes.

Here’s an example of the output content for I am trying to generate based on data created within Bubble. It’s a mix of pulling in Episode things data, as well as things related to the Epsode thing (like a Links thing, Notes thing, etc) https://a.hans0n.com/Nrtm.html

However, I’d love to be able to generate the content for each show within Bubble, using the Episodes thing data I am creating on bubble…

The trouble I am running into is that it’s quite cumbersome to create long paragraphs of text/content in Bubble that pulls in a mix of static content and dynamic content. Specifically, trying to use this tiny box to populate a bunch of content doesn’t quite work: CleanShot 2021-04-12 at 09.25.01@2x · CleanShot Cloud.

I am wondering if anyone has solved a similar issue of generating a lot of content with a mix of static/dynamic content? I suppose I could integrate with a document generation tool, but those are mostly geared towards generating PDF"s and in this case I just need to generate html or markdown content for each episode.

I’m not working with as much text, but I used my own variables rather than dropping the actual Bubble data blobs into the text. This allows me to create the entire text outside bubble first, then just paste it in. I then use find and replace (there is also a bulk find a replace plugin that is useful if you have a large number of variables) to replace the variables with the dynamic data.

In my use case, my users are generating their own templates for emails and text messages on the frontend, so this approach makes it possible for them to generate text dynamically without interacting directly with the Bubble backend.



Show notes:

Support us!

The show

Format everything exactly the way you want it in a notepad on your computer first, then paste it into Bubble. Then use find and replace on it to replace all the variable with the dynamic text.

Hey, that’s a really good idea thanks! It’s kind of like a hand rolled handlebars. And, I like the idea of setting up the “template” from the frontend as well. Going to give this a try. Thanks for the help! Was getting stuck here

1 Like