Skip to main content
RapidDev - Software Development Agency
bubble-tutorial

How to delete database things in Bubble

Deleting records in Bubble uses the Delete a Thing action for single records and Schedule API Workflow on a List for bulk deletions. This tutorial covers safe deletion patterns including soft delete with a flag, cascading related records, bulk delete operations, and undo functionality.

What you'll learn

  • How to delete single records with Delete a Thing
  • How to implement soft delete versus hard delete
  • How to cascade deletions to related records
  • How to perform bulk deletions safely
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate5 min read15-20 minAll Bubble plans (bulk operations require Starter+)March 2026RapidDev Engineering Team
TL;DR

Deleting records in Bubble uses the Delete a Thing action for single records and Schedule API Workflow on a List for bulk deletions. This tutorial covers safe deletion patterns including soft delete with a flag, cascading related records, bulk delete operations, and undo functionality.

Overview: Deleting Database Records in Bubble

Deletion is permanent in Bubble — there is no undo or recycle bin. This makes it critical to implement safe deletion patterns. This tutorial covers single and bulk deletion, soft delete alternatives, and handling related records.

Prerequisites

  • A Bubble app with Data Types containing records
  • Understanding of Bubble workflows and data relationships
  • Backend workflows enabled for bulk operations (Starter+)

Step-by-step guide

1

Delete a single record with Delete a Thing

In a workflow, add the action Data → Delete a Thing. Set the Thing to delete using the appropriate context: Current cell's DataType in a Repeating Group, a search result :first item, or a result from a previous step. Bubble permanently removes the record. Add a confirmation step before deletion — show an Alert or Popup asking Are you sure you want to delete this? with Confirm and Cancel buttons.

Pro tip: Always add a confirmation dialog before deletion. Accidental deletions cannot be undone in Bubble.

Expected result: The selected record is permanently removed from the database after user confirmation.

2

Implement soft delete instead of hard delete

Soft delete marks a record as deleted without actually removing it. Add a field called deleted (yes/no, default: no) to your Data Type. Instead of Delete a Thing, use Make Changes to Thing and set deleted to yes. Update all your searches to include deleted = no as a constraint. This lets you restore accidentally deleted records and maintain historical data.

Expected result: Records are flagged as deleted but remain in the database for potential recovery.

3

Handle cascading deletions of related records

When you delete a parent record (e.g., a Project), related child records (e.g., Tasks, Comments) still exist as orphans. Before deleting the parent, search for all related records and delete them first. Create a workflow that: (1) Searches for all child records referencing the parent. (2) Deletes each child record. (3) Deletes the parent record. For multiple child types, delete them in the correct order.

Expected result: Deleting a parent record also removes all related child records, preventing orphaned data.

4

Bulk delete records with Schedule API Workflow on a List

For deleting many records at once, create a backend API workflow called delete-single-record that takes a Thing parameter and deletes it. In your frontend workflow, use Schedule API Workflow on a List with the list set to your search results and the workflow set to delete-single-record. This processes each deletion server-side without freezing the browser.

Expected result: Large numbers of records are deleted reliably via background processing.

5

Add undo functionality with temporary soft delete

For a better user experience, implement a temporary undo window. When the user clicks Delete, set deleted = yes and show a toast notification with an Undo button that sets deleted back to no. Use a Do When Condition Is True or scheduled workflow to hard-delete the record after 10 seconds if the user does not click Undo.

Expected result: Users have a brief window to undo deletions before they become permanent.

Complete working example

Workflow summary
1DELETION PATTERNS SUMMARY
2==========================
3
4PATTERN 1: Hard Delete (single record)
5 Workflow: Delete button clicked
6 1. Show Popup: ConfirmDelete
7 2. Confirm button: Delete a Thing Current cell's Record
8
9PATTERN 2: Soft Delete
10 Data Type field: deleted (yes/no, default: no)
11 Delete workflow: Make Changes deleted = yes
12 All searches: add constraint deleted = no
13 Restore: Make Changes deleted = no
14 Cleanup: Backend workflow periodically hard-deletes records where deleted = yes AND Modified Date < 30 days ago
15
16PATTERN 3: Cascading Delete
17 Workflow: Delete Project button clicked
18 1. Schedule API on List: Search Tasks (project = This Project)
19 delete-single-task workflow
20 2. Schedule API on List: Search Comments (project = This Project)
21 delete-single-comment workflow
22 3. Delete a Thing: This Project
23 (Order matters: delete children before parent)
24
25PATTERN 4: Bulk Delete
26 Backend workflow: delete-single-record
27 Parameter: record (DataType)
28 Action: Delete a Thing record
29 Frontend workflow:
30 Schedule API Workflow on a List:
31 List: Search for Records (condition)
32 Workflow: delete-single-record
33
34PATTERN 5: Undo Delete
35 1. Make Changes deleted = yes, deleted_at = Now
36 2. Show toast: "Deleted. [Undo]"
37 3. Undo click: Make Changes deleted = no
38 4. Scheduled cleanup: Delete things where deleted=yes AND deleted_at < 10 seconds ago

Common mistakes when deleting database things in Bubble

Why it's a problem: Deleting records without a confirmation dialog

How to avoid: Always show a confirmation popup or dialog before executing the Delete a Thing action

Why it's a problem: Not deleting related child records before the parent

How to avoid: Search for and delete all related child records before deleting the parent record

Why it's a problem: Using Delete a List of Things from the frontend for large datasets

How to avoid: Use Schedule API Workflow on a List for bulk deletions of 100+ records

Best practices

  • Always add a confirmation step before permanent deletion
  • Consider soft delete for critical data to enable recovery
  • Delete related child records before parent records to prevent orphans
  • Use Schedule API Workflow on a List for bulk deletions
  • Add a temporary undo window for better user experience
  • Implement a cleanup workflow that periodically hard-deletes old soft-deleted records

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I need to implement safe deletion in my Bubble.io app. I want soft delete for important records, cascading deletion for related records, bulk delete capability, and a brief undo window. Can you outline the patterns and workflows?

Bubble Prompt

Set up safe deletion for my app. I need a soft delete system with an undo window, cascading deletion for Projects and their Tasks, and a bulk delete option for admin users.

Frequently asked questions

Can I recover a permanently deleted record?

No. Once you use Delete a Thing in Bubble, the record is permanently removed. There is no recycle bin or undo feature. This is why soft delete is recommended for important data.

Does deletion free up storage?

Deleting records frees database storage, but files (images, documents) associated with deleted records remain in the File Manager until manually deleted.

How much does a deletion cost in WUs?

A single Delete a Thing costs approximately 0.5 WU. Bulk deletions via Schedule API Workflow cost WUs per record.

Can I delete records via the Data API?

Yes. Send a DELETE request to https://yourapp.bubbleapps.io/api/1.1/obj/datatype/uniqueid with proper authentication.

What happens to fields referencing a deleted record?

Fields that referenced the deleted record become empty. Searches that included the record no longer return it. Custom states holding the deleted record still reference it until the page reloads.

Can RapidDev help with data management architecture?

Yes. RapidDev has built data management systems in Bubble including archival workflows, audit trails, cascading operations, and GDPR-compliant data deletion processes.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.