Skip to main content
Custom Events

Events that can be triggered by other workflows.

Bhavika Kaneria avatar
Written by Bhavika Kaneria
Updated over a week ago

Experience Level

This core reference entry is suited for intermediate-level builders.

In-depth articles (10):

To learn about this topic more in-depth, we recommend reading the suggested articles below:

Custom events


Workflows


Logic

Workflows is a part of the Logic series in the user manual.

  • Article series: Logic

    • 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.

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:

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.

Did this answer your question?