Workflows (beta)
This section covers workflows - the engine in your app that makes stuff happen.
Last updated
This section covers workflows - the engine in your app that makes stuff happen.
Last updated
Workflows are the engine of your application – they are how you instruct Bubble to respond to what the user does, such as clicking a button, with a set of actions that can do anything from hiding/showing or animating things on the page to making changes in the database and make external API calls.
A workflow is the combination of an event that triggers one or more actions.
An event is anything that tells a workflow to run, such as:
A button being clicked
An input's value being changed
A condition being true
A user logging in or out
Changes in the database
Events can run on a page, or they can be triggered (which doesn't require that a user has a page open).
Article series: Events
Actions are the operations that take place when a workflow is triggered by an event. You can place as many actions as you need inside one workflow. Actions can do things like:
Creating, updating and deleting things in your database
Hiding, showing and animating elements on the page
Creating user accounts and logging users in/out
Sending emails
Navigating to a different page
Loading data
Using plugins, such as making a payment
This is not an exhaustive list, but as you can see, the actions in a workflow is how you make your app respond to a user's actions or changes in conditions.
Article: Actions
The workflow canvas is structured to help you stay focused by letting you work on one workflow at a time. Workflows are arranged vertically, starting with the event at the top, followed by a sequential list of actions beneath it.
Each action category is marked with a unique icon on the left, making it easy to quickly identify specific actions in your workflow. In the example above, the user icon reflects that the action belongs to the Account action category.
Next to the icon is the action label, which is customizable in the property editor of that action. Underneath you will see any condition placed on the action.
Workflows in the workflow editor can be categorized in two ways for easier navigation: by creating folders and adding colors to workflows. There are no rules or best practices on how to best organize your workflows, but we recommend giving some thought as to how you can combine colors with folders to efficiently navigate pages with a lot of workflows.
Each workflow you add can be given one of the following colors:
Gray (default)
Blue
Red
Green
Orange
Purple
Cyan
Brown
You can also organize workflows into folders, available in the left-hand menu of the workflow canvas. Each folder can be given a custom name. To add a new workflow to a specific folder, you can hover the folder and click the + symbol that appears. Workflows can also be dragged/dropped between folders.
By default, all workflows are placed in the Uncategorized folder. In the example below, we have created a custom folder and named it Buttons.
Each folder name is followed by the number of workflows within that specific folder.
The left-hand bar allows you to quickly search for workflows by typing their name. Matching workflows will be highlighted in yellow, while non-matching workflows will be temporarily hidden as long as the search bar contains a value.
You can share a specific workflow’s unique URL by copying it directly from the browser’s address bar while the workflow is open. This feature is helpful for keeping detailed (by including the URL to a specific workflow in the notes) or sharing a direct link to the workflow with team members for .
Workflows can hit errors in different scenarios. For example:
A user tries to log in using the wrong credentials
A user tries to sign up using an email that already exists in the database
A credit card payment fails because the card is declined
If a workflow runs into an error, it will stop running on the action where the error happened. Any previous actions will not be reverted.
Note that the errors we are discussing in this section are related to system errors, and not to errors that are flagged by Bubble's issue tracker.
Bubble's default way to communicate most errors is to show the error in the browser's standard message popup. You can instruct Bubble to handle errors on specific elements or more broadly on a page by using two different events. The links below point to guides for each type:
This event will catch errors that happen related to a specific element. For example, if a Log in button connected to a workflow containing the Log the user in action generates an error, the error will be connect to that button.
Article section: Using the An element has an error running a workflow event
This event will catch errors more broadly: any error on the page will trigger it unless it's caught by another error event.
Video tutorial: How to use the Unhandled Error Occurs event
In rare instances, workflows can , generally indicating that the server has been overwhelmed with tasks that it cannot complete within a five-minute window. Bubble may also halt processing to preserve system stability, or timeouts may occur due to technical issues like lost server connections.
Timeouts are more likely with or those processing large volumes of data. For instance, operations like Make changes to a list of things are efficient for up to 1,000 records but may slow down or time out beyond that number. For handling lists approaching or exceeding 10,000 records, it's highly recommended to use backend operations better suited for large data volumes.
If you want to learn more about bulk operations, you can have a look at the article below:
Article: Bulk operations
We also explore optimizing your app for performance and in the article below. This can be helpful if you plan to work with large amounts of data or particularly demanding server processes:
Article series: Optimizing for workload