# How to add a report spam feature in Bubble

- Tool: Bubble
- Difficulty: Beginner
- Time required: 15-20 min
- Compatibility: All Bubble plans
- Last updated: March 2026

## TL;DR

A spam reporting feature lets users flag inappropriate content, automatically hides content after a threshold of reports, and provides admins with a review queue. This tutorial covers creating a Report Data Type, adding flag buttons to content elements, implementing auto-hide logic when report counts exceed a threshold, and building an admin moderation queue for reviewing and actioning flagged content.

## Overview: Adding a Report Spam Feature in Bubble

This tutorial shows you how to build a spam reporting system in Bubble. Users can flag content with a reason, the system tracks report counts, auto-hides heavily reported content, and admins review flagged items from a dedicated moderation dashboard.

## Before you start

- A Bubble app with user authentication
- Content Data Types (posts, comments, listings) that need moderation
- Basic understanding of Bubble workflows and Repeating Groups

## Step-by-step guide

### 1. Create the Report Data Type

In the Data tab, create a Report Data Type with fields: content_type (text — e.g., 'Post', 'Comment'), content_id (text — Unique ID of the reported item), reporter (User), reason (Option Set: ReportReason — Spam, Harassment, Inappropriate, Misinformation, Other), details (text — optional description), status (Option Set: ReportStatus — Pending, Reviewed, Dismissed). Also add a report_count (number) field to your content Data Types (Post, Comment, etc.) for fast threshold checking. Create an Option Set called ReportReason with values matching your moderation needs.

**Expected result:** Your database supports tracking individual reports with reasons and a report count on content records.

### 2. Add the report button and submission flow

On each content card or item, add a flag icon or Report button visible only when Current User is logged in and is not the content author. The button click shows a popup with a Dropdown for ReportReason, an optional Multiline Input for details, and a Submit button. The Submit workflow: (1) Create a Report with content_type, content_id, reporter = Current User, reason from dropdown, status = Pending. (2) Make changes to the content item — increment report_count by 1. (3) Hide the popup and show a 'Thank you for reporting' message. Add an Only when condition to prevent duplicate reports: Do a Search for Reports where content_id = this item and reporter = Current User :count is 0.

> Pro tip: Prevent duplicate reports by checking if the current user has already reported this specific content before showing the report form.

**Expected result:** Users can report content with a reason, and duplicate reports from the same user are prevented.

### 3. Implement auto-hide after report threshold

Add an is_hidden (yes/no) field to your content Data Types. After incrementing report_count in the report workflow, add a condition: Only when report_count (after increment) is greater than or equal to your threshold (e.g., 3). If the condition is met, set is_hidden to yes on the content item. Update all Repeating Groups displaying this content to include the constraint: is_hidden is no (or is not yes). This automatically removes heavily reported content from public view while preserving it for admin review.

**Expected result:** Content with 3 or more reports is automatically hidden from all users except admins.

### 4. Build the admin moderation queue

Create an admin page accessible only to users with admin role. Add a Repeating Group showing reported content: Do a Search for Reports where status = Pending, sorted by Created Date descending. In each cell, display the report reason, reporter name, content preview, and report count. Add action buttons: Dismiss (changes Report status to Dismissed and decrements report_count), Remove Content (deletes or permanently hides the content and changes Report status to Reviewed), and Warn User (sends a notification to the content author). Group multiple reports for the same content item together using :group by content_id.

**Expected result:** Admins have a dedicated moderation dashboard showing all pending reports with action buttons.

## Complete code example

File: `Workflow summary`

```text
SPAM REPORTING SYSTEM
======================

DATA TYPES:
  Report:
    - content_type: text
    - content_id: text
    - reporter: User
    - reason: Option Set (Spam/Harassment/Inappropriate/Other)
    - details: text
    - status: Option Set (Pending/Reviewed/Dismissed)

  Content Data Types (Post, Comment, etc.):
    - report_count: number
    - is_hidden: yes/no

REPORT SUBMISSION WORKFLOW:
  1. Check: no existing report from this user for this content
  2. Create Report (content_type, content_id, reason, status: Pending)
  3. Increment content's report_count by 1
  4. If report_count >= 3: set content is_hidden = yes
  5. Show confirmation message

ADMIN MODERATION:
  Queue: Search Reports where status = Pending
  Actions per report:
    - Dismiss: status → Dismissed, decrement report_count
    - Remove: hide/delete content, status → Reviewed
    - Warn: send notification to content author

DISPLAY FILTERING:
  All public Repeating Groups: constraint is_hidden is no
```

## Common mistakes

- **Not preventing duplicate reports from the same user** — Without duplicate prevention, one angry user could report the same content repeatedly to trigger the auto-hide threshold Fix: Check if a Report already exists from the Current User for the specific content_id before allowing submission
- **Permanently deleting reported content immediately** — Some reports are false or malicious — immediately deleting content removes the admin's ability to review and potentially restore it Fix: Use soft-hide (is_hidden = yes) first and let admins make the final decision to permanently remove or restore content
- **Not filtering hidden content from all display locations** — If you add is_hidden filtering on one page but forget another, hidden content still appears in some views Fix: Add is_hidden is no as a constraint on every Repeating Group and search that displays user-facing content

## Best practices

- Store report_count as a field on content records for fast threshold checking
- Use soft-hide (is_hidden) instead of hard delete for initial auto-moderation
- Prevent duplicate reports from the same user for the same content
- Group related reports in the admin queue for efficient review
- Keep the report form simple — a dropdown reason and optional details text
- Add is_hidden constraint to every user-facing content display

## Frequently asked questions

### What is a good report threshold for auto-hiding?

Three to five reports is typical. Start with 3 for stricter moderation or 5 for more lenient. Monitor false positive rates and adjust as your community grows.

### Should I notify the content author when their content is reported?

Not on individual reports (to prevent report abuse awareness), but notify them when content is auto-hidden or when an admin takes action.

### How do I prevent users from abusing the report system?

Limit one report per user per content item, track users who frequently submit dismissed reports, and consider reducing report weight for users with high false-positive rates.

### Can I customize report reasons for different content types?

Yes. Use different Option Sets for different content types, or use a single Option Set with attributes that specify which content types each reason applies to.

### Can RapidDev help implement content moderation in Bubble?

Yes. RapidDev can build a complete moderation system including reporting, auto-hide, admin review queues, user warnings, and ban systems for your Bubble app.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/add-a-report-spam-feature-in-bubble
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/add-a-report-spam-feature-in-bubble
