Bubble.io Backend Workflows: Server-Side Logic That Runs Without Users
Backend API workflows run on Bubble’s servers independently of any user session. Scheduled jobs, webhook handlers, recursive processing, and API endpoints — every pattern explained with a four-step creation walkthrough.
What Backend Workflows Are and Why You Need Them
Frontend workflows run when a user does something in the browser. When the browser closes, the workflow stops. Backend API workflows solve this: they run on Bubble’s servers, completely independent of any user session. They cannot be stopped by a browser closing, a network glitch, or a user navigating away. They are the backbone of serious Bubble application architecture.
Six Use Cases That Require Them
Scheduled Jobs
Run at a specific future time or on a recurring schedule. Send trial-ending emails 3 days before expiry. Generate weekly summaries every Sunday. Run daily health score updates for every workspace.
Webhook Handlers
Receive HTTP requests from external services (Stripe, Zapier). Exposed as public API endpoints. Process event data, update records, trigger follow-up actions. The backbone of Stripe billing.
Recursive Processing
Process large datasets without timeout. Process 100 records, schedule the next 100, continue until complete. Used for bulk imports and large-scale data updates.
API Endpoints
Expose your Bubble app as an API. External systems POST to your endpoint, the workflow processes the data and returns a response. Enables Zapier integrations and cross-system sync.
Heavy Calculations
Long-running aggregation that would timeout in a frontend workflow. Calculate last month’s revenue per customer. Generate export data across all workspaces.
Async Email Sequences
Frontend triggers first email immediately; schedules subsequent emails via backend. Each checks whether conversion already happened before sending the next nudge.
Step-by-Step
In the Bubble editor, click ‘Backend Workflows’ in the left navigation. This section is separate from the Workflow tab used for frontend workflows.
Click ‘Add new backend workflow’. Give it a descriptive name describing what it does: send_trial_ending_email, process_stripe_webhook, generate_weekly_digest.
Parameter: workspace_id
(text)
// Find the workspace in Step 1 using the parameter
Step 1
: Find Workspace where Unique ID = workspace_id
Step 2
: Only when workspace’s subscription_status = Trialing
Step 3
: Send email to workspace’s owner
Action
: Schedule API workflow
API workflow
: send_trial_ending_email
When
: Workspace’s trial_ends_at – 3 days
workspace_id
: Workspace’s Unique ID
Q: What is the difference between a frontend and backend workflow?
Frontend workflows run in the user’s browser and stop if the browser closes. Backend API workflows run on Bubble’s servers and complete regardless of what the user does.
Q: Can a backend workflow access the current user?
Not directly — backend workflows run without a user session. Pass the user’s Unique ID as a parameter and retrieve the User record using that ID inside the workflow.
Q: How do I test a backend workflow?
Use the ‘Run manually’ option in the Backend Workflows editor with test parameters. For webhook testing, use the Stripe CLI or Webhook.site to send test events to your endpoint URL.
Build Your Bubble.io App With Expert Help
Pakistan’s leading Bubble.io development team. Multi-tenant SaaS architecture, Stripe billing, and full product builds done right from day one.
