# How to set up a backend workflow in Bubble.io: Step-by-Step Guide

- Tool: Bubble
- Difficulty: Intermediate
- Time required: 20-25 min
- Compatibility: Starter plan+ (backend workflows require paid plans)
- Last updated: March 2026

## TL;DR

Backend workflows in Bubble run server-side and survive browser closure, making them essential for scheduled tasks, data processing, and API-triggered operations. This tutorial covers enabling the backend workflow page, creating API endpoints, scheduling workflows for future execution, and understanding when to use backend versus frontend workflows.

## Overview: Setting Up Backend Workflows in Bubble

Backend workflows are server-side processes that run independently of the user's browser. They are essential for scheduled tasks, processing external webhooks, handling bulk operations, and any logic that must complete even if the user closes their browser. This tutorial covers enabling backend workflows, creating them, triggering them from the frontend, and choosing between backend and frontend patterns.

## Before you start

- A Bubble app on a paid plan (Starter or higher)
- Understanding of frontend workflows and workflow actions
- Basic knowledge of Data Types and API concepts
- Familiarity with the Workflow tab

## Step-by-step guide

### 1. Enable the Workflow API and access backend workflows

Go to Settings in the left sidebar, then click the API tab. Check the box labeled 'Enable Workflow API'. This activates the backend workflow endpoint for your app. Now go to the Workflow tab and click the Pages dropdown at the top-left. At the bottom of the dropdown, you will see a link labeled 'Backend workflows'. Click it to open the backend workflow editor. This editor looks similar to the regular Workflow tab but shows server-side events instead of page events.

**Expected result:** The Workflow API is enabled and you can access the backend workflow editor.

### 2. Create a basic backend API workflow

In the backend workflow editor, click to add a new event. Select 'New API Workflow'. Name it descriptively with lowercase and hyphens (like 'process-order' or 'send-reminder'). Add parameters that the workflow needs: for example, order_id (text) or user (User). Add actions just like frontend workflows: Make changes to a thing, Send Email, Create a new thing, etc. Check 'This workflow can be run without authentication' only if it needs to be called by external services without a Bubble token. Check 'Ignore privacy rules' if the workflow needs to access data beyond the calling user's permissions.

> Pro tip: Backend workflow names become API endpoints — use clear, URL-friendly names like 'send-weekly-report' not 'Send Weekly Report!!'.

**Expected result:** A backend API workflow with parameters and actions, accessible at https://yourapp.bubbleapps.io/api/1.1/wf/[name].

### 3. Trigger a backend workflow from the frontend

In a frontend workflow (like a button click), add the action 'Schedule API Workflow' (found under API Workflow in the action menu). Select your backend workflow from the dropdown. Set the parameter values from dynamic expressions. Set the Scheduled date to Current Date/Time to run immediately, or a future date to run later. The workflow runs server-side independently of the user's browser. Use 'Schedule API Workflow on a list' to run the workflow once for each item in a list — useful for batch processing.

**Expected result:** Backend workflows are triggered from frontend actions and run server-side at the scheduled time.

### 4. Create a recurring scheduled workflow

To run a workflow on a schedule (daily, weekly), create a backend workflow that re-schedules itself. Add your main logic (cleanup, reports, etc.) as actions. As the final action, add 'Schedule API Workflow' pointing to itself with a Scheduled date of Current Date/Time + days:1 (for daily) or + days:7 (for weekly). Add a termination condition: store a 'should_run' flag in a Settings Data Type and check it before proceeding. To start the recurring workflow, create a one-time frontend trigger (admin button) that schedules the first execution.

**Expected result:** A self-rescheduling backend workflow that runs automatically on a recurring schedule.

### 5. Understand when to use backend vs frontend workflows

Use backend workflows when: the process must complete even if the user closes their browser (order processing, email sends), the process needs to run at a future time (reminders, expirations), external services need to trigger it (webhooks), bulk operations need to process many records, or the workflow needs to ignore privacy rules for administrative operations. Use frontend workflows when: the result must be shown to the user immediately, the workflow interacts with page elements (show/hide, set states), or the operation is simple and user-initiated (creating a single record, navigating to a page).

**Expected result:** A clear understanding of when to use backend versus frontend workflows for different use cases.

## Complete code example

File: `Workflow summary`

```text
BACKEND WORKFLOW SETUP SUMMARY
================================

ENABLE:
  Settings → API tab → Check 'Enable Workflow API'

ACCESS:
  Workflow tab → Pages dropdown → 'Backend workflows'

CREATE API WORKFLOW:
  Name: lowercase-with-hyphens
  Parameters: define inputs (user, order_id, etc.)
  Options:
    □ Run without authentication (for external calls)
    □ Ignore privacy rules (for admin operations)
  Actions: same as frontend (create, modify, email, etc.)
  Endpoint: https://app.bubbleapps.io/api/1.1/wf/[name]

TRIGGER FROM FRONTEND:
  Action: Schedule API Workflow
  Select: [your backend workflow]
  Parameters: set from dynamic expressions
  Scheduled date:
    Now: Current Date/Time (run immediately)
    Later: Current Date/Time + hours:24 (run tomorrow)

BATCH PROCESSING:
  Action: Schedule API Workflow on a list
  List: Search for [things to process]
  Workflow: [backend workflow for single item]

RECURRING SCHEDULE:
  Backend workflow: 'daily-task'
  Actions:
    1. [Your main logic]
    2. Schedule API Workflow 'daily-task'
       Scheduled: Current Date/Time + days:1
       Only when: Settings's should_run = yes
  Initial trigger: Admin button → Schedule first run

BACKEND vs FRONTEND:
  Backend: survives browser close, scheduled execution,
    bulk processing, webhooks, admin operations
  Frontend: immediate UI feedback, element interaction,
    simple user-initiated actions
```

## Common mistakes

- **Forgetting to enable the Workflow API before creating backend workflows** — Without the Workflow API enabled, the backend workflow editor is not accessible and scheduled workflows will not execute Fix: Go to Settings → API tab and check 'Enable Workflow API' before creating any backend workflows
- **Not deploying backend workflows before trying to schedule them** — Backend workflows only run in the environment they are deployed to — a workflow created in Development but scheduled in Live will return 404 Fix: Deploy your app to the appropriate environment before scheduling backend workflows that need to run there
- **Creating recursive workflows without a termination condition** — Without a stop condition, the workflow reschedules itself infinitely, consuming workload units until your allocation is exhausted Fix: Always add an Only when condition or a flag check that prevents the workflow from rescheduling beyond the intended period

## Best practices

- Enable the Workflow API in Settings before creating backend workflows
- Use descriptive, URL-friendly names for backend workflows
- Always include termination conditions in recursive scheduled workflows
- Deploy backend workflows before scheduling them for execution
- Use 'Ignore privacy rules' only when the workflow genuinely needs admin-level access
- Log backend workflow executions to a Debug Data Type for monitoring

## Frequently asked questions

### Do backend workflows require a paid plan?

Yes. Backend workflows require a Starter plan or higher. The free plan does not support the Workflow API or scheduled workflows.

### Can external services trigger my backend workflows?

Yes. If you check 'This workflow can be run without authentication', any service can call it via HTTP POST to the workflow's URL endpoint. For security, add a secret token parameter and validate it in the workflow.

### How do I debug backend workflows?

Use the Logs tab in the editor to see execution history and errors. For detailed debugging, create a Debug Data Type and log values at each step of the workflow.

### Can backend workflows access the current user?

Backend workflows do not have a current user context unless triggered from a frontend workflow (which passes the user's authentication). For scheduled and webhook-triggered workflows, pass user information as a parameter.

### How many backend workflows can run simultaneously?

Bubble queues backend workflows and processes them based on your plan's server capacity. High volumes may experience delays. Monitor execution timing in the Logs tab.

### Can RapidDev help set up backend workflows?

Yes. RapidDev can design and implement backend workflow architectures including webhook handlers, scheduled processing, bulk operations, and error handling for your Bubble app.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/setup-backend-workflow-bubble
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/setup-backend-workflow-bubble
