How to Make Dynamic Webhooks in Bubble.io and Respect App Version
We'll show you how to create dynamic webhooks while ensuring that your app version is respected. Webhooks are essential for integrating your application with third-party services, and making them dynamic allows for greater flexibility and functionality.
Unlock dynamic webhooks: Learn how to make your Bubble.io app version-proof!
Master API endpoints with dynamic data: Avoid common webhook pitfalls!
Supercharge your backend workflows: Create flexible, version-independent webhooks!
Building an AI Image Generation App with Flux in Bubble
In an earlier video, we demonstrated how you can build an AI image generation app using Flux in Bubble, and we explained how you can use a webhook to inform your app when an API has completed the process you've requested it to do. This is particularly useful if you are doing something with an API that will take an indefinable amount of time or a long amount of time. Because rather than just your Bubble app waiting for the steps to complete, in which case it may timeout, it's simply saying when you're ready, when you've completed generating the image, send a notification with some id details so I know which image it is to this backend workflow. And so we're saying use this as a webhook. And then if I go into the backend workflows, I have changed this app slightly.
Saving Images to the Database
This is just my demo app, but it would be this workflow here that I would then go ahead and save the image to the database. Go and check out our original Flux video on how to do that. But we've had a comment that points out something that I'll admit I overlooked, which is you need to make the webhook dynamic because this webhook is specific to the version test.
Making Webhooks Dynamic
So what do we do? Well, we can simply take it like this. I'm going to copy that to my clipboard, I'm going to add in some dynamic values, I'll say Webhook and then it's not private. And then I'll go to my page where the user generates their image, go to my workflow, and now I can dynamically fill the webhook in here. So we want to make this as dynamic as possible.
Using Dynamic Data for Webhooks
I would consider doing it like this. I'm just going to drag some text onto the page to give an example, which is we can say app or that's home homepage URL. And so we can use this dynamic data. And if I click preview, we get the specific app homepage for this version. And also note that this is using the primary domain, the domain that is set, or rather isn't set because this is the temporary domain the app lives on.
Ensuring Webhook Flexibility
And so we want to make it as dynamic as possible because when you update the domain or even move domains, we don't want you to have to. It's just something that's going to go wrong if you have to go back and rewrite the webhook address. So we know that we can say this app's homepage will print this. Notice it ends in a slash so we can use that to form part of our dynamic data here.
Constructing the Dynamic Webhook URL
So we can say this app's homepage. And then I'm going to paste in the full webhook and just cut out the bits that I no longer need. That's just a little bit fiddly in here. Maybe I should have used arbitrary text. But look, there we go. So we know it ends in a slash. So I can take it all the way back. This is there we go back to there.
Finalizing the Dynamic Webhook
So this is now going to print the homepage slash version test. No, no. In fact we take, of course, of course we take out version test. So you want it to be the homepage slash API 1.1 workflows image webhook. So this is similar. If you have seen our videos on AssemblyAI, this is exactly the same process. In fact, I think we include this step in our AssemblyAI videos for speech to text transcription. But here you go.
Conclusion and Next Steps
This is kind of catching up. It's an add on for our video about Flask. And if you're watching this video, it's probably because you've got an idea and you wanted to build it with no code. Build it in Bubble, click the link down in the description to get access to our community. And we've got tons of resources for people just like you.
Get the Complete Bundle for Just $99
Access 3 courses, 390+ 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 390+ 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.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.