Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Reporting API 2.2.0 Minor update available for module reporting (2.2.0). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: Project Browser Localizer 3.0.10 Minor update available for module pb_localizer (3.0.10). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7). Security Coverage: NetStorage Media Module netstorage_media now has official Drupal security advisory coverage.

This project automatically moderates comment spam by scoring each comment for spam risk and providing a reason. It then uses a rule to unpublish any comment that scores 8 or higher, ensuring a deterministic and efficient moderation process.

What it does

AI Comment Spam Moderation scores each incoming comment for spam risk and saves a score and one-sentence reasoning. This companion recipe replaces the base recipe's LLM-based publish decision with a deterministic ECA rule that unpublishes any comment scoring 8 or higher.

Why it matters

The unpublish threshold is a simple numeric comparison, so it should be deterministic, free and instant rather than a second AI round-trip. Using ECA removes the extra provider call, makes the decision 100% reproducible, and avoids the occasional malformed-JSON responses that a boolean LLM call can produce.

How it works

When applied, the recipe configures:

  • applies its base recipe (AI Comment Spam Moderation),
  • switches the base recipe's LLM boolean status automator to an action worker so it no longer runs on comment save,
  • creates an ECA workflow on comment save that reads the AI-generated `spam_score`,
  • unpublishes any comment whose `spam_score` is 8 or higher.

The base recipe's scoring automator runs before the ECA workflow, so the score is always written before the threshold is evaluated.

Requirements & compatibility

How to get started

  1. Install module dependencies (including AI and AI Automators).
  2. Configure an AI provider/model and set a default for `chat_with_complex_json`.
  3. Apply the recipe.
  4. Post comments on an Article and verify the spam score and reasoning are saved, and that high-scoring comments are unpublished.
  5. Use `/admin/content/ai-comment-spam` for moderation triage.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Jul 8, 2026