> For the complete documentation index, see [llms.txt](https://manual.bubble.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.bubble.io/help-guides/logic/workflows/events.md).

# Events

Events are what start a workflow. Learn the difference between frontend and backend events, which types of events you can use in your app, and how to add one to a workflow.

{% hint style="info" %}
Events can happen in both the frontend and the backend of your app. If you're new to that idea, it can help to read this article first:

**Article:** [The frontend and backend](https://manual.bubble.io/help-guides/logic/the-frontend-and-backend.md)
{% endhint %}

Nothing happens in a workflow[^1] until something tells it to start. That something is the *event*. A user clicks a button, a record changes in the database, or another app sends a request, and the event sets one or more [actions](https://manual.bubble.io/help-guides/logic/workflows/actions.md) in motion.

<figure><img src="https://34394582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M5sbzwG7CljeZdkntrL%2Fuploads%2FhHx9ynlgYcvZhkQbuRoI%2Fevents.jpeg?alt=media&amp;token=9f1cced8-f0ef-4442-bb11-9ce75ee589fe" alt="A diagram illustrating how workflows are a combination of an event and one or more actions."><figcaption><p>An event triggers one or more actions, and together they make up a workflow.</p></figcaption></figure>

Every workflow has this same structure, but what can start one is flexible. This article covers the types of events you can use, where each one happens, and how to add one to a workflow.

***

## Frontend and backend events

Events are split by where they happen. Frontend events are triggered on the user's device, and backend events are triggered on Bubble's server.

<figure><img src="https://34394582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M5sbzwG7CljeZdkntrL%2Fuploads%2FpQZtx1mSegmIhhLf7Huy%2Fserver-vs-device-events.jpeg?alt=media&amp;token=0df8ec81-a51b-44d8-a441-6d6d402e436a" alt="Two icons side by side: an event above a laptop labeled User&#x27;s device, and an event above a database labeled Bubble server."><figcaption><p>The <em>event</em> is what <em>triggers</em> a workflow. A workflow triggered on the user's device (frontend) can still lead to actions on the server, but it <em>starts</em> on the device.</p></figcaption></figure>

|                           | Frontend events                                                                                                                                                             | Backend events                                    |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| Where the trigger happens | On a page, or on a view[^2] if you're using [Bubble for native mobile apps](https://manual.bubble.io/help-guides/getting-started/building-for.../native-ios-and-android.md) | On Bubble's server                                |
| When it can run           | Only while the page is open                                                                                                                                                 | Any time, whether or not anyone is using your app |
| Where you build it        | The **Workflow** tab                                                                                                                                                        | The **Backend workflows** tab                     |

An event only decides where a workflow *starts*. A frontend event can still lead to actions that run on the server, such as saving data to the database.

### Frontend events

Frontend events are triggered on a **page**. They're often, but not always, started by a user, and they only trigger while the page is open. They fall into three categories:

| Category       | What triggers it                                                                                                                                                                                                                                                                                                          |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Element events | Something happens with an element[^3], such as one being clicked.                                                                                                                                                                                                                                                         |
| General events | Something changes in the app, such as the page loading, a user logging in or out, or a [condition](https://manual.bubble.io/help-guides/logic/conditions.md) becoming true. They can also [repeat every few seconds](https://manual.bubble.io/help-guides/logic/workflows/events/frontend-events/recurring-workflows.md). |
| Custom events  | Another workflow triggers them. [Custom events](https://manual.bubble.io/help-guides/logic/workflows/events/frontend-events/custom-events.md) save you from duplicating workflows that you use in several places.                                                                                                         |

**Article series:** [Frontend events](https://manual.bubble.io/help-guides/logic/workflows/events/frontend-events.md)

### Backend events

Backend events are triggered on Bubble's **server**. Since the server is always running, they can start a workflow at any time, whether or not a page is open. They're the result of a schedule, a change in the database, an [API request](#user-content-fn-4)[^4] from an external app, or another workflow in your app.

| Event                                                                                                                        | What triggers it                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [API workflows](#user-content-fn-5)[^5]                                                                                      | Another workflow schedules them to run at a set time, or an external app sends an API request.                             |
| [Recurring events](#user-content-fn-6)[^6]                                                                                   | They run at a time you choose, then repeat at a set interval, such as once a week.                                         |
| [Database trigger events](#user-content-fn-7)[^7]                                                                            | A change in the database matches the conditions you set.                                                                   |
| [Backend custom events](https://manual.bubble.io/help-guides/logic/workflows/events/backend-events/backend-custom-events.md) | Another workflow in your app triggers them with the **Trigger backend custom event** action, and waits for them to finish. |
| [In-app purchase events](https://manual.bubble.io/core-resources/events/in-app-purchase-events.md)                           | Apple or Google sends a billing update for a subscription in your native mobile app.                                       |

{% hint style="info" %}
Backend workflows are turned off by default, so you may need to turn them on before you can use these events.

**Article section:** [Enabling backend workflows](https://manual.bubble.io/help-guides/logic/the-frontend-and-backend.md#enabling-backend-workflows)
{% endhint %}

**Article series:** [Backend events](https://manual.bubble.io/help-guides/logic/workflows/events/backend-events.md)\
**Reference:** [Events](https://manual.bubble.io/core-resources/events.md)

***

## Adding an event to a workflow

A workflow starts with its event, so picking one is the first thing you do when you create a workflow. Here's how to do it in the **Workflow** tab:

{% stepper %}
{% step %}

#### Click New

In the **Workflow** tab, click **New** in the upper-right corner of the workflow list.

<figure><img src="https://34394582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M5sbzwG7CljeZdkntrL%2Fuploads%2FYVwZy2I0WIE7iNrusfuw%2Fimage.png?alt=media&amp;token=dab035fc-6f32-4129-b722-57b00f7c0580" alt="The Workflow tab with an empty workflow list, showing zero workflows on this page and the New button highlighted in the upper-right corner."><figcaption><p>The <strong>New</strong> button sits at the top of the workflow list.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Pick an event

Pick the event from the dropdown. Events are grouped into categories, such as *General* and *Custom*, and you can also search for an event by name.

<figure><img src="https://34394582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M5sbzwG7CljeZdkntrL%2Fuploads%2FrgJNR1odHoMhH3g3Sb2B%2Fpick-event%20type.png?alt=media&amp;token=779d330a-21f8-47d1-911f-288d74380b67" alt="The event dropdown with a search field and the General category expanded, listing events such as User is logged in, Page is loaded, and Do when condition is true."><figcaption><p>Hover over a category to see its events, or use the search field at the top of the dropdown.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Add actions

The workflow opens in the workflow canvas, with the event at the top. Click the *+* icon below it to add your first action.

<figure><img src="https://34394582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M5sbzwG7CljeZdkntrL%2Fuploads%2F3eMHAuYK5KVGyhYZkeW9%2FCleanShot%202026-10-13%20at%2013.27.24.png?alt=media&amp;token=7e354acb-4c6e-43e0-9819-8e976e28927a" alt="The workflow canvas showing the Button Sign up is clicked event, with the plus button below the event highlighted for adding the first action."><figcaption><p>When you open a workflow in the workflow canvas, the event is displayed and you can add actions by clicking the <em>+</em> icon.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

Backend events are set up in the **Backend workflows** tab, and the steps depend on the type of event.

**Article series:** [Backend events](https://manual.bubble.io/help-guides/logic/workflows/events/backend-events.md)

***

## Set up events with Bubble AI

You can ask the [Bubble AI Agent](https://manual.bubble.io/help-guides/ai/bubble-ai-agent.md) to create a workflow with the right event for you. Describe what should start the workflow and what should happen next, then open the **Workflow** or **Backend workflows** tab to see what it built and edit it yourself.

The Agent supports a set list of [frontend events](https://manual.bubble.io/help-guides/ai/bubble-ai-agent/edit-apps-with-ai.md#generate-and-modify-frontend-workflows), including the page loading, users logging in or out, conditions, element clicks, and input changes. Custom events aren't on that list. In the backend, it can [create API workflows and run workflows on a schedule](https://manual.bubble.io/help-guides/ai/bubble-ai-agent/edit-apps-with-ai.md#generate-and-modify-backend-workflows), but it can't build custom events. It can still explain how to set up things it can't build.

Here are a few prompts to try:

{% code overflow="wrap" %}

```
Create a workflow that runs when the Country dropdown's value is changed. It should reset the City input.
```

{% endcode %}

{% code overflow="wrap" %}

```
Create a workflow that runs when the page is loaded. It should show the Welcome group if the current user is logged in.
```

{% endcode %}

{% code overflow="wrap" %}

```
Create a workflow that shows an alert when the Log In button has an error running a workflow.
```

{% endcode %}

{% code overflow="wrap" %}

```
Create a backend workflow named weekly-reset that runs every Friday.
```

{% endcode %}

```
Which events start the workflows on this page?
```

**Article:** [Edit apps with AI](https://manual.bubble.io/help-guides/ai/bubble-ai-agent/edit-apps-with-ai.md)

***

## FAQ: Events

<details>

<summary>What is an event in Bubble?</summary>

An event is what starts a workflow. It can be something a user does, like clicking a button, or something that happens on the server, like a change in the database.

</details>

<details>

<summary>Can a workflow have more than one event?</summary>

No. Each workflow has one event. To run the same actions from different events, you can place the actions in a [custom event](https://manual.bubble.io/help-guides/logic/workflows/events/frontend-events/custom-events.md) and trigger it from each workflow.

</details>

<details>

<summary>What happens to frontend events when the user closes the page?</summary>

They stop triggering, since they only work while the page is open. Any frontend workflow that hasn't finished also stops. If the work has to finish, or has to happen without the user, use a backend event.

**Article:** [The frontend and backend](https://manual.bubble.io/help-guides/logic/the-frontend-and-backend.md)

</details>

<details>

<summary>Can a frontend event start a backend workflow?</summary>

Yes. A frontend workflow can use the **Schedule API workflow** action to schedule an API workflow, or the **Trigger backend custom event** action to run a backend custom event and wait for it to finish.

</details>

<details>

<summary>Why did my Page is loaded event run more than once?</summary>

The *Page is loaded* event also triggers when the *Go to page* action is used, even if the page doesn't technically reload. You can add a condition to stop it from running more often than you intended.

**Article series:** [Frontend events](https://manual.bubble.io/help-guides/logic/workflows/events/frontend-events.md)

</details>

<details>

<summary>Do database trigger events run when I change data in the Data tab?</summary>

Yes. Database trigger events react to the data itself, so they run no matter where the change came from, including a manual edit in the **Data** tab.

**Article section:** [Triggering a workflow when data changes](https://manual.bubble.io/help-guides/logic/workflows/events/backend-events.md#triggering-a-workflow-when-data-changes)

</details>

<details>

<summary>Can someone outside my app trigger a backend event?</summary>

Only if you expose an API workflow as a public API workflow, and by default external apps need to authenticate to run it. If you check *This workflow can be run without authentication*, anyone who knows the endpoint URL can trigger it. Backend custom events can't be triggered from an external system.

**Article section:** [Triggering a workflow from an external app](https://manual.bubble.io/help-guides/logic/workflows/events/backend-events.md#triggering-a-workflow-from-an-external-app)

</details>

<details>

<summary>Do events use workload?</summary>

A workflow doesn't cost anything by itself, but what an event checks can matter. For example, the *Do when condition is true* event is based on a dynamic expression, which can run on the device or on the server, depending on what the condition is checking.

**Article section:** [Do when condition is true and conditions](https://manual.bubble.io/help-guides/workload/optimizing-workload/optimization-checklist/workflows-and-actions.md#do-when-condition-is-true-and-conditions)

</details>

<details>

<summary>Do events work in native mobile apps?</summary>

Yes. In a native mobile app, frontend events happen on a view instead of a page. If your project has both a web app and a native mobile app, they share the same backend. Native mobile apps can also use [in-app purchase events](https://manual.bubble.io/core-resources/events/in-app-purchase-events.md).

**Article:** [Native mobile vs. web development](https://manual.bubble.io/help-guides/getting-started/building-for.../native-ios-and-android/native-mobile-vs.-web-development.md)

</details>

[^1]: A *workflow* is the combination of an event and one or more actions.\
    **Article:** [Workflows](https://manual.bubble.io/help-guides/logic/workflows.md)

[^2]: A view is the top-level element in a native mobile app, serving the same role that a page does in a web app.\
    **Article:** [The view element (mobile)](https://manual.bubble.io/help-guides/design/elements/ios-and-android-app/the-view.md)

[^3]: *Elements* are the objects that you place on the page as you design your app. There are many different types of elements, like texts, buttons, input fields, and calendars.\
    **Article series:** [Elements](https://manual.bubble.io/help-guides/design/elements.md)

[^4]: An API request is a message sent to your app to ask for specific information or perform a specific task.\
    **Article series:** [API](https://manual.bubble.io/help-guides/integrations/api.md)

[^5]: API workflows are server-side workflows that you can schedule from within your app, or expose so that an external app or system can trigger them through an API request. API workflows are part of the Workflow API.\
    **Article:** [API workflows](https://manual.bubble.io/help-guides/integrations/api/the-bubble-api/the-workflow-api/api-workflows.md)

[^6]: Recurring events are backend events that run a workflow on a thing at a fixed interval, such as once per day or once per week.\
    **Reference:** [Recurring event](https://manual.bubble.io/core-resources/events/recurring-event.md)

[^7]: Database trigger events are backend events that watch for specific changes in the database and run a workflow when a change matches their conditions.\
    **Article:** [Database trigger events](https://manual.bubble.io/help-guides/logic/workflows/events/backend-events/database-trigger-events.md)
