Skip to main content
All CollectionsBubble FeaturesOther Features
Walk-Through: How to Return Data from Custom Events
Walk-Through: How to Return Data from Custom Events

Learn how to send multiple types of data between workflows to build more modularly and efficiently. By Vivienne Chen

Updated over 5 months ago

Walk-Through: How to Return Data from Custom Events

Bubble’s on a mission to be the only no-code app-building platform with the power and flexibility of custom code — without having to write any. This is why we're especially excited to release the ability to return data from custom events.

You are building amazing things on Bubble, and this feature makes it easier for you to not only build modularly, but to also scale more effectively — because your workflows can now send multiple types of data between one another.

For example, if you’re taking payments in your app, you can create a custom “authorization” event in your payment workflows that checks whether a user’s credit card can be charged. With this new feature, you can return a yes/no value for whether the user can be charged and an optional text value for an error message if they can’t. Then you can use these values in a new workflow that either:

  1. Charges the user’s credit card if they’re authorized or

  2. Sends the user an “error” email if the authorization fails to remind them to resolve the issue

With return data from custom events, you can:

  • Reduce the number of custom events in your app: Use a single event to return different values, instead of multiple custom events with slight variations

  • Build more modularly and resourcefully: Edit ‌reusable custom events in one place, rather than multiple

  • Understand your app better: View one custom event, rather than multiple custom events with slight variations

This also means reusable elements can now hold global functions — so workflows will act even more like traditional programming functions.

Read more in our manual and give it a try today.

Did this answer your question?