Mastering Custom Events in Bubble: Boost Your Workflow Efficiency 🚀 – ratio.dev

A YouTube tutorial by Dennis H. Lewis (May 2, 2025) explaining Bubble's custom events. The speaker introduces custom events as reusable subroutines within Bubble workflows, emphasizing they accept input parameters and can return results. The video frames custom events as a favorite feature that improves workflow efficiency by enabling modular, reusable application components.
Let's talk about custom events. Look after the Bubble API connector. This may be one of my favorite parts of the bubble building experience. Why? Because custom events rock.
But what are custom events? So they are basically just subroutines.
They take input parameters and they can return back a result.
So what makes them special? Why is Dennis so crazy about custom events that he wants to do a whole video about them? Custom events are how you make sure that your workflow steps happen when you want them to. There's only really two ways of doing this in Bubble. One is when you use the result of a previous step in a workflow, and the other is when you use a custom event. Bubble promises us that if you trigger a custom event, it will execute completely before it will continue the next steps in the workflow. So this is really important. Also, this allows you to create steps that you will know will happen consecutively instead of running in parallel. Because we know that Bubble loves to run things in parallel. But wait, there's more. I just really wanted to say that way. Custom events are awesome for creating routines that you can reutilize throughout your application so you don't repeat them. Instead of repeating the same workflows over and over again, you create a custom event and then when you need to change them, you only have to change it once. So imagine you have a desktop menu and you have a mobile menu. You click on this text link and it goes to this page. And you could do the same on another one, but then you would have the action twice. Whereas if you do it the other way, both can call the same custom event. And then if you need to make a change, you just change it in the place. So that is one of the real reasons why custom events are really cool. But wait, there's even more. Now that custom events can return values, you can use them to create temporary variables that you can use throughout your workflow. So, for example, you can create an event that returns a database search. For example, let's jump into the builder and see one here. This is a custom event that the first thing it's going to do is trigger another custom event called calculate refreshed transactions. And all this does, if I go into this is it returns two searches. What I do is the first step is I run this custom event that does the two searches. And now all of my steps afterwards, they don't have to do any more searches, so I don't have to pay Bubble for them. They're already run. I can just reference them as the result of that first custom event that I did. So here, when I want to make a list of changes, I just look at result of this first step. Its result was, and I took the list of transactions and I made that and I used it. So now I can do a search once and use it as many times as I want inside my workflow without having to repeat it. Not only does this save me time and money, but it's great because if I have to change that search, I only have to change it in one place, which is awesome. This is also great for doing calculations. So if you need to do a calculation and you want the result of it, do it in a custom event, return the result, and now you can use that result in any other place in the workflow that you want just by referencing the result of that first custom event. So this is really powerful for making your workflows more efficient and also being able to do things that beforehand we just couldn't do. And finally, I want to share with you one more awesome trick that you can use with custom events in your application. Bubble has an action that is called trigger a custom event from a reusable element. That means that you can create a reusable element in your application, call it core functionalities or call it reusable events, whatever you want to call it. You can just embed that reusable element onto any page that you needed, and then you can reference any and call the custom events that are inside that reusable element whenever you want. Now you have a repository, a library of custom events that you can use anywhere in your application. Just put the reusable on the page and then you can call. You can trigger a custom event from inside of it without having to copy it or duplicate it into that page. So once again, we're making maintenance easier. We're making things more efficient. And that is just a really awesome way to make your application more modular so that maintaining it and updating it is easier down the road. Believe me, the more times you have to copy and paste something from one page to another, the more complicated it's going to be down the road. So it's a really great trick as well. Hopefully by now you understand why custom events are so awesome and put them to use in your bubble application. If you have any questions about custom events, send them my way. Go to ratio.dev and send us a message or put a comment down below. Hope you've enjoyed this short and quick video. See you in the next one.
More from Dennis

Is Google Killing Websites? The Future of Search, SEO & Web Design After Google I/O

Something we're still looking forward to in Bubble: richer design experiences! #bubble #nocode #ai

Big mistake companies are making right now: firing employees instead of empowering them. #ai







