Experience Level
This core reference entry is suited for intermediate-level builders.
In-depth articles (10):
In-depth articles (10):
To learn about this topic more in-depth, we recommend reading the suggested articles below:
Custom events
Article: Custom events
Workflows
Logic
Workflows is a part of the Logic series in the user manual.
Article series: Logic
Article: The frontend and backend
Article: Dynamic expressions Dynamic expressions are used both to set up conditions, and are highly useful in different actions that you may want to add to your workflows.
Article: Conditions Conditions are used to determine whether a workflow or action should run or not, by checking whether something is true.
Article series: Navigation Using workflows to let the user navigate between pages and page sections.
Debugging
All apps have the occasional bug, and our debugging tools help you squish them efficiently. The debugger helps you go through workflows step by step to see how they perform and the values they return.
Article series: Debugging your application
Videos (3):
Videos (3):
Bubble Academy: The Workflow Tab: Bubble Introduction Series [4/10]
Bubble Academy: Understanding Workflow Execution Rules
Getting started with Bubble: Workflows and logic: Getting started with Bubble
Create a custom event...
Bubble allows custom workflows to reuse the same logic in more than one workflow.
The Create a custom event event defines the workflow
You can give a custom workflow a name and a label
The name is used then you trigger the custom event from another workflow
The label is what Bubble shows in the workflow editor
You can trigger a custom event in two ways:
The Trigger a custom event action
The Schedule a custom event action
Event name
Enter the name of the workflow. This name will be displayed in the list of custom events when you use the Trigger a custom event or Schedule a custom event actions
Call parameters
Parameters
You can include parameters when you trigger a custom event. These parameters first need to be defined on the custom event itself.
Name: This field accepts any name you want to give the parameter.
Type: This field determines what data type the parameter should expect, such as User, text, or number.
Is a list/array: if checked, the parameter will accept lists, such as multiple users or texts.
Optional: if checked, the parameter will not be treated as required. If unchecked, the Bubble issue tracker will create an issue if you use the Trigger a custom event or Schedule a custom event actions without specifying the required parameters.
Return values
If you intend for the custom workflow to provide a return value, such as the outcome of a calculation, specify the type and label for this new return value here.
Return values can be any type of data, just like parameters.
Use the Return data action in the custom workflow to return data.
Use conditions to specify whether the data should be returned.
The workflow will stop running if it hits a valid Return data action.