Bubble Docs
Ask or search…
K

Events

This section covers events, which are the triggers that start a workflow
Events can happen both in the frontend and backend parts of your app. If you are unfamiliar with this concept we recommend you first read our dedicated article on the subject: Article: The frontend and backend
All workflows are a collection of one or more actions that are triggered by an event. In other words, the event is the starting point that initiates the running of one or more actions in a workflow.
As the diagram above illustrates, every workflow consists of these two steps, but how these steps work is highly flexible. This article will focus on the various conditions that can result in an event being triggered.
In the Workflow editor, clicking an event shows and lets you add actions to run whenever the event is triggered.

Frontend and backend events

Frontend and backend events are different in one simple way: the former refers to events that are triggered on the user's device and the latter refers to events that are triggered on the server.
The event refers to what triggers a workflow. A workflow triggered on the user's device (frontend) can still lead to stuff happening on the server – but it starts on the device.

Frontend events

Frontend events are the triggers that happen on a page. It's often – but not always – initiated by a user. Frontend events will only trigger as long as the page is open. They are categorized into three categories:
  • Element events - all events related to elements, such as one being clicked.
  • General events - general events are triggered as soon as a general property of the app change, such as when a user logs in/out or a conditional dynamic expression becomes true.
  • Custom events - custom events are events that can be triggered by another workflow, to avoid duplicating workflows that you use in multiple places
Frontend events can still lead to actions happening on the server – but the event (or trigger) happens on the page.
Article series: Frontend events

Backend events

Backend events are the triggers that happen on the server. They are the result of an event being scheduled, an event being set to repeat at a set interval, changes made in the database or an API request from an external app. Backend events will trigger regardless of whether a page is open.
  • General events - general events are triggered by one of the following:
    • An API request coming from internally in your app or an external app
    • A recurring event that's scheduled to run at a specific time, and from there on on a specific interval, such as weekly
    • A database trigger event, which triggers if a specific change is happening in the database
  • Custom events - custom events are events that can be triggered by another workflow, to avoid duplicating workflows that you use in multiple places
Article: Backend events
Last modified 5mo ago