OpenAI, Markdown & Bubble.io
Learn how to integrate OpenAI with your Bubble.io app to create a more visually appealing presentation of your data using Markdown.
Transform raw OpenAI responses into beautiful HTML: Learn how to enhance your OpenAI integration with markdown formatting in Bubble!
Elevate your Bubble app's UI: Discover the power of markdown to create stunning tables and formatted text effortlessly.
From plain text to polished output: Master the art of converting OpenAI's markdown responses into visually appealing HTML elements in your Bubble app.
Integrating OpenAI and Markdown in Bubble.io
My thanks to our amazing YouTube community for sending in this question regarding markdown and OpenAI and integrating that into your Bubble app. For example, I've just got a really simple (it's not pretty but it works) OpenAI integration going on with my Bubble app. If you want to see how to do that through the API connector, we've got those videos on that. I put a link down in the description to get you started. Effectively, I'm asking OpenAI to respond with some data and saying respond with a table in markdown. This is the response that I get back and it's not very pretty. In fact, if I was building like a ChatGPT clone, I'd want to present this in a much more beautiful manner than is currently available.
Installing the Markdown Plugin
So let me show you how we can do this and it really is quite simple. I go back into the editor. I've installed a plugin called markdown pro and what this allows me to do is add an element to the page. The reason that a lot of plugins rely on you adding an element to a page is because there's a script library. There's some code behind them and by adding it to the page, you're saying let's load in this code because there's going to be a library of code behind this that takes Markdown and converts it into HTML.
Setting Up the Workflow
What am I converting? Well, if I go into my workflow, you can see I send the message to OpenAI and then its response I'm saving in a custom state. This is just so that it's nice and quick. Custom states are like a temporary holding cell for data. Nothing's being written to my database because I'm not demonstrating how to make a ChatGPT clone here. I'm actually just showing how to get markdown and make it look good.
Implementing the Markdown Plugin
Let's go back and it means that my source, if I'm gonna just drag this into it, I'm wanting to convert the custom state, which I believe I've got on the page. Yeah, reply. So I'm taking the text that is the result of the OpenAI API call and I'm putting it into the plugin and I've got all of these options there enabled by default. Then instead of outputting just the custom state's text, I will take a code block or HTML block. I'm gonna add it in here.
Structuring the Page Layout
Then just looking at the structure of my page, let's group these together into a column because I want to be able to compare the HTML with the actual text. Make this 100% width. So in here I put the result of my plugin because the plugin element on the page is going to take the whole output of the OpenAI API response and it's going to turn that into HTML. Then by placing that in an HTML element on my page, I'm going to make that run the HTML and put the HTML on the page.
Testing the Implementation
Let's go back to our demo, refresh it, and I'll say submit. Okay, there we go, so here's our difference. We've got our raw output here and we've got what got put into the HTML block. Let's just inspect this so I can show what's really going on. You can see we actually do get a table and rows and that's the plugin doing its job of taking markdown and converting it to HTML.
Conclusion and Next Steps
Now, this doesn't look that pretty, but it is definitely the first step to getting there because we now have an actual HTML page rather than just text with all of these indentations and spaces because that's the output of OpenAI. So I think I'm gonna stop things there, but I will in a follow-up video demonstrate how we can add some CSS to this and improve the styling of this table output.
Ready to Transform Your App Idea into Reality?
Access 3 courses, 400+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 400+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
14-Day Money-Back Guarantee
We’re confident this bundle will transform your app development journey. But if you’re not satisfied within 14 days, we’ll refund your full investment—no questions asked.
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Frequently Asked Questions
Find answers to common questions about our courses, tutorials & content.
Not at all. Our courses are designed for beginners and guide you step-by-step in using Bubble to build powerful web apps—no coding required.
Forever. You’ll get lifetime access, so you can learn at your own pace and revisit materials anytime.
Our supportive community is here to help. Ask questions, get feedback, and learn from fellow no-coders who’ve been where you are now.
Absolutely. If you’re not satisfied within 14 days, just reach out, and we’ll issue a full refund. We stand by the value of our bundle.
Yes, this is a special limited-time offer. The regular price is $350, so take advantage of the discount while it lasts!