Reader small image

You're reading from  Democratizing No-Code Application Development with Bubble

Product typeBook
Published inApr 2024
PublisherPackt
ISBN-139781804610947
Edition1st Edition
Right arrow
Author (1)
Caio Calderari
Caio Calderari
author image
Caio Calderari

Caio Calderari is a No-Code Expert, Startup Founder and Senior Product Designer with 17+ years of experience. Starting as a designer in 2005, he worked for advertising, digital agencies, corporate companies and startups worldwide. He learned no-code tools to be able to build his own startups and side projects and later decided to teach others too. In 2020, he created a YouTube channel about no-code tools offering courses and tutorials. By 2021, he became the Chief No-Code Officer at a U.S.-based company, helping entrepreneurs from various countries launch their startup ideas. Caio is a creative individual, passionate about sharing his knowledge. His goal is to bring no-code to more creators, helping them unlock this new world of possibilities.
Read more about Caio Calderari

Right arrow

Workflow Automation and Logic

This chapter will introduce you to workflows and will teach you how to configure elements and create actions, triggers, and set up logic statements. We will dive into the Workflow tab and learn how workflows work and what you can do with workflows. You will also learn how to integrate your designs (the frontend) and the database with workflows to allow you to create powerful applications. Workflows are an essential part of any Bubble application while the database is the heart of your product, the frontend is the face of your application, and the workflows are the brain, so, you need to know how they work together.

Additionally, we will also explore backend workflows and explain how to use them to allow you to build cool automation inside your projects.

In this chapter, we will cover the following:

  • An introduction to workflows and logic features
  • Creating actions and triggers for user interactions
  • Managing workflows and elements
  • ...

An introduction to workflows and logic features

What are workflows and logic triggers? Workflows are a sequence of actions or steps. Think of it as a recipe or a checklist, a sequence of steps to accomplish something. This sequence will be activated by specific events or user interactions that happen inside your application, which we call triggers. Logic triggers fire the sequence of steps configured inside a workflow, and then things happen.

For instance, when a user clicks a button, it creates a new user account and sends them to another page. It might sound simple, but for that to happen, multiple little steps had to happen in order for that account to be created. The trigger is the person clicking the button and the workflow is the little steps that happen to create the user account, store the information on the database, and then redirect the user to another page.

The cool thing about using Bubble and no-code is that you will be able to define workflows and triggers using...

Creating actions and triggers for user interactions

Let’s dive in and get familiar with this very powerful area inside Bubble. In this section, you are going to learn how to create workflows in practice. Get familiar with the Workflow tab – you are going to use it a lot.

The Workflow tab inside Bubble is shown here:

Figure 7.1: The Workflow tab

Figure 7.1: The Workflow tab

There are two ways of creating new workflows:

The first way is by going to the Workflow tab and clicking to add an event. You will have to pick an option and then specify which component or action will trigger the workflow.

Workflow categories and actions are shown here:

Figure 7.2: Workflow categories and actions

Figure 7.2: Workflow categories and actions

If you create a new workflow without choosing an element, you will have access to a few options under the General category. It can be used as a global trigger that will fire under certain conditions, meaning no one needs to click anything to start that...

Managing workflows and elements

As you can see, each page will have a few workflows, so it is very common to have a huge list of workflows in no time. To help organize workflows, Bubble has a few features that can make your life less chaotic when building and using workflows.

An example of settings to organize workflows is shown here:

Figure 7.12: Workflow organization

Figure 7.12: Workflow organization

If you click on the little arrow on the left, close to the sidebar, it will open more options. On the workflow Properties panel, you can choose colors and create folders to better organize your workflows. You can choose, for instance, to group them using folders to specify what is what. You can also assign colors to specific types of workflows to be able to better identify for instance, which workflows are actions, which workflows are dealing with errors, which workflows are related to payment, and so on. You can create your own organization system using these features.

Workflows and...

Incorporating conditions and logic statements

Now, let’s dive into some logic and conditions. Logic plays a huge part in conjunction with workflows and databases, and a very commonly used technique inside Bubble is called custom states. This is a resource that can be used to define specific variables and you can use them as conditionals to change how elements look and behave.

A custom state is a type of variable or data storage that is unique to an element within an application. Think of it like this: I can have custom states added to specific components and use that variable from it, which allows you to store and manage information specific to that particular element, such as a button or a group, without affecting the overall database. Custom states can be used to temporarily hold data or values that are relevant only within the context of that element and are typically used for dynamic changes or interactions within the user interface. It is not something you will store...

Backend workflows

Working with logic and workflows can be very powerful and allow you to build complex types of projects using Bubble; it is amazing what you can do with it. Backend workflows can do a multitude of actions and allow you to run workflows in the background. By nature, this is a little more complex feature so it will require you a bit of time to master it. This subject could be a full book by itself, so here you are going to just learn the basics. It is recommended you keep studying it after reading this book to fully understand backend workflows. Let’s dive into it.

The main difference between regular workflows and backend workflows is that backend workflows will run in the background, on the server side of your application, not on the page itself. While using backend workflows, you can trigger API workflows, database events, recurring events (loops), and custom events.

To add a new backend workflow, you first need to configure it under your application settings...

Summary

In this chapter, we’ve covered the basics of workflows, triggers, and actions. You learned what workflows are and how they work, how to set up workflows, and how to configure actions to run when the workflows are triggered.

You also learned how to organize workflows, edit workflows, what custom states are and how to create new ones, change existing values, and use conditionals based on custom states.

This chapter also explained how to use filters to prevent workflows from running and how to add pauses or use the results of previous steps to better control your workflows. You learned the basics about backend workflows and how they work.

Understanding these concepts will be important in helping you build multiple types of applications using Bubble and no-code, as the workflows are an essential part when it comes to building software with dynamic features, data, and logic. In the next chapter, you are going to learn how to structure and use databases, create data...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Democratizing No-Code Application Development with Bubble
Published in: Apr 2024Publisher: PacktISBN-13: 9781804610947
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Caio Calderari

Caio Calderari is a No-Code Expert, Startup Founder and Senior Product Designer with 17+ years of experience. Starting as a designer in 2005, he worked for advertising, digital agencies, corporate companies and startups worldwide. He learned no-code tools to be able to build his own startups and side projects and later decided to teach others too. In 2020, he created a YouTube channel about no-code tools offering courses and tutorials. By 2021, he became the Chief No-Code Officer at a U.S.-based company, helping entrepreneurs from various countries launch their startup ideas. Caio is a creative individual, passionate about sharing his knowledge. His goal is to bring no-code to more creators, helping them unlock this new world of possibilities.
Read more about Caio Calderari