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.
Prerequisites
- 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
Enable the Workflow API and access backend workflows
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.
Create a basic backend API workflow
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].
Trigger a backend workflow from the frontend
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.
Create a recurring scheduled workflow
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.
Understand when to use backend vs frontend workflows
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 working example
1BACKEND WORKFLOW SETUP SUMMARY2================================34ENABLE:5 Settings → API tab → Check 'Enable Workflow API'67ACCESS:8 Workflow tab → Pages dropdown → 'Backend workflows'910CREATE API WORKFLOW:11 Name: lowercase-with-hyphens12 Parameters: define inputs (user, order_id, etc.)13 Options:14 □ Run without authentication (for external calls)15 □ Ignore privacy rules (for admin operations)16 Actions: same as frontend (create, modify, email, etc.)17 Endpoint: https://app.bubbleapps.io/api/1.1/wf/[name]1819TRIGGER FROM FRONTEND:20 Action: Schedule API Workflow21 Select: [your backend workflow]22 Parameters: set from dynamic expressions23 Scheduled date:24 Now: Current Date/Time (run immediately)25 Later: Current Date/Time + hours:24 (run tomorrow)2627BATCH PROCESSING:28 Action: Schedule API Workflow on a list29 List: Search for [things to process]30 Workflow: [backend workflow for single item]3132RECURRING SCHEDULE:33 Backend workflow: 'daily-task'34 Actions:35 1. [Your main logic]36 2. Schedule API Workflow 'daily-task'37 Scheduled: Current Date/Time + days:138 Only when: Settings's should_run = yes39 Initial trigger: Admin button → Schedule first run4041BACKEND vs FRONTEND:42 Backend: survives browser close, scheduled execution,43 bulk processing, webhooks, admin operations44 Frontend: immediate UI feedback, element interaction,45 simple user-initiated actionsCommon mistakes when setting up a backend workflow in Bubble.io: Step-by-Step Guide
Why it's a problem: Forgetting to enable the Workflow API before creating backend workflows
How to avoid: Go to Settings → API tab and check 'Enable Workflow API' before creating any backend workflows
Why it's a problem: Not deploying backend workflows before trying to schedule them
How to avoid: Deploy your app to the appropriate environment before scheduling backend workflows that need to run there
Why it's a problem: Creating recursive workflows without a termination condition
How to avoid: 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
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I need to set up backend workflows in my Bubble app for processing orders, sending daily reminder emails, and handling Stripe webhook events. Can you help me plan which workflows I need and how to configure them?
Help me create a backend workflow that processes orders after payment. It should update the order status, send a confirmation email, and schedule a review request email for 7 days later. Also set up a daily cleanup workflow for expired records.
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.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation