/bubble-tutorials

How to build branching logic in Bubble workflows

Learn how to build effective branching logic in Bubble workflows with clear steps that improve app flow, user experience, and automation.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.

Book a Free Consultation

How to build branching logic in Bubble workflows

You build branching logic in Bubble workflows by using Only when conditions on workflow actions (or separate event branches) so Bubble decides which action runs based on the data at that moment. Every branch is simply an action with its own Only when expression.

 

What Branching Logic Means in Bubble

 

Bubble does not have traditional “if/else blocks.” Instead, every workflow action can have an Only when condition. If that condition is true, the action runs; if not, Bubble skips it. Multiple actions can create multiple branches.

  • To create “IF,” add an action with an Only when condition.
  • To create “ELSE,” add another action below it with the opposite condition.
  • All branches live in the same workflow, but only the matching ones run.

 

Step-by-Step Example

 

Imagine a button that should do different things depending on whether the user has a profile complete.

  • Create Workflow → “When Button X is clicked”.
  • Add an action: Navigate to Page “dashboard”.
    Set Only when: Current User’s profile\_complete is yes.
  • Add another action: Show Popup “CompleteProfile”.
    Set Only when: Current User’s profile\_complete is no.

Now you have two clean branches. Bubble automatically runs only the matching one.

 

Backend Workflow Branching

 

Branching works the same in backend workflows. Each action can check conditions based on incoming parameters, Things, or API data.

// Example of a safe branching pattern in a backend workflow
// Action 1 runs ONLY when order total is high
Only when This Order's total > 500: send email "VIP order"

// Action 2 acts as fallback
Only when This Order's total <= 500: send email "Standard order"

 

Best Practices

 

  • Keep each branch’s condition mutually exclusive to avoid both running.
  • If multiple actions belong to the same branch, give all of them the same Only when condition.
  • Avoid overly complex expressions; use custom states or fields if needed.

This is the most reliable way to create clear, predictable branching logic in Bubble workflows.

Explore More Valuable No-Code Resources

How to integrate Bubble.io with Git?

Learn how to seamlessly integrate Bubble.io with Git through our comprehensive step-by-step guide. Perfect for beginners and professionals.

Explore

How to integrate Bubble.io with Reddit Ads?

Learn how to seamlessly integrate Bubble.io with Reddit Ads using our easy step-by-step guide. Boost your ad management today!

Explore

How to integrate Bubble.io with AWS S3?

Explore our step-by-step guide on integrating Bubble.io with AWS S3, making your app development process more efficient and secure.

Explore

How to integrate Bubble.io with Lucidchart?

Follow our step-by-step guide to seamlessly integrate Bubble.io with Lucidchart, enhancing your workflow & productivity.

Explore

How to integrate Bubble.io with Kentico?

Learn how to seamlessly integrate Bubble.io and Kentico with our comprehensive, easy to follow step-by-step guide.

Explore

How to integrate Bubble.io with Box?

Discover easy-to-follow steps for integrating Bubble.io with Box. Boost your workflow and secure your files seamlessly today.

Explore

Stuck in Bubble.io? We’re here to help!

Fix broken workflows | Optimize logic | Boost performance | Scale with confidence

4.9
Clutch rating 🌟
600+
Happy partners
17+
Countries served
190+
Team members

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Cookie preferences