Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: DonorPerfect 1.0.20 Minor update available for module donorperfect (1.0.20). Release: Bootstrap Cloud 7.1.5 Minor update available for theme bootstrap_cloud (7.1.5). Release: MCP Sentinel 2.23.1 Minor update available for module mcp_sentinel (2.23.1). Release: Audit Chain 1.9.1 Minor update available for module audit_chain (1.9.1). Release: Menu Autopilot 1.4.1 Minor update available for module menu_autopilot (1.4.1). Release: GraphQL Compose Codegen 1.4.1 Minor update available for module graphql_compose_codegen (1.4.1). Release: Field Guard 1.3.1 Minor update available for module field_guard (1.3.1). Release: Webships Starter 2.0.0 Major update available for module webships_starter (2.0.0). Module Revived: Flag for Someone Else 1.0.2 Module flag_fse updated after 9 months of inactivity (1.0.2). Security Coverage: smart 404 Module smart_404 now has official Drupal security advisory coverage.

Comment Moderation AI

No security coverage Drupal 11 · not 10
View on drupal.org

This module uses artificial intelligence to automatically moderate user-generated comments on Drupal 11 sites. It analyzes comments as they are submitted, flagging potentially inappropriate content for human moderators and integrating with existing Drupal workflows. The module also offers custom policies for keyword filtering, rate limiting, and PII protection.

Comment Moderation AI helps site owners automatically moderate user‑generated comments using artificial intelligence. The module evaluates comments at submission time and assists moderators by flagging potentially inappropriate, risky, or non‑compliant content before it becomes publicly visible.
This module is designed for Drupal 11 sites that require scalable comment moderation while retaining human oversight and editorial control

Features

Comment Moderation AI adds the following capabilities to Drupal’s core Comment system:

  • AI‑powered comment analysis
  • Automatically evaluates new comments using an external AI moderation service. Currently supporting Open AI via its moderation API

  • Real‑time moderation at submission
  • Comments are analyzed as they are posted, allowing immediate flagging or moderation actions

  • Workflow‑friendly moderation
  • Integrates with Drupal’s existing comment approval and moderation interface, allowing moderators to review flagged comments using familiar tools

  • Automatic status assignment
  • Comments can be automatically marked for review or moderation based on AI evaluation results.

  • Configurable moderation behavior
  • Site administrators can enable or disable moderation behavior based on site requirements.

  • Drupal 11 native support
  • Built specifically for Drupal 11 and follows modern Drupal development best practices.

Integration with OpenAI's newest omni-moderation-latest model for superior accuracy and multimodal support. Enable/disable specific OpenAI moderation categories (hate speech, harassment, violence, etc.)

Also this module integrates will with Key module for managing Open AI keys securely




Intelligent Status Management: Risk-based automatic status assignment (high/medium/low priority) based on confidence scores with comprehensive workflow statuses including auto_flagged_high, auto_flagged_medium, flagged_low_risk, and pending_review.

Advanced Custom Policies: Beyond OpenAI moderation, includes keyword filtering, length restrictions, rate limiting, competitor detection, marketing content identification, and PII protection (emails, phones, SSNs, credit cards, addresses).

Enhanced Views Integration: Seamless integration with Drupal's /admin/content/comment/approval view featuring color-coded status badges, priority indicators, advanced filtering options, and visual flagged/clean indicators.

Post-moderation Capabilities: Allow community members to flag published comments with escalation workflows and comprehensive audit trails for all moderation decisions.

Post-Installation

After installation, navigate to Configuration → OpenAI Comment Moderation (/admin/config/comment-moderation-ai) to configure the module:

  1. OpenAI API Setup: Enter your OpenAI API key and select your preferred moderation model (omni-moderation-latest recommended). Use the built-in connection test to verify your API setup.
  2. Core Moderation Settings: Enable moderation, configure auto-flagging and auto-unpublishing behaviors, and set sensitivity thresholds (0.0 to 1.0).
  3. OpenAI Categories: Enable/disable specific moderation categories like hate speech, harassment, self-harm, sexual content, and violence.
  4. Custom Policies: Configure additional rules including keyword filtering, length restrictions, rate limiting, competitor detection, marketing content blocking, and PII protection.
  5. Permissions: Set up user permissions at /admin/people/permissions for viewing flagged comments, moderating content, and bypassing moderation checks.

Once configured, the module automatically moderates new comments and enhances your existing comment approval workflow at /admin/content/comment/approval with visual status indicators and advanced filtering options.

Additional Requirements

  • OpenAI API Key: Required for AI-powered moderation features. Sign up at OpenAI Platform
  • PHP 8.3+: Required for optimal performance with regex operations and modern PHP features
  • PHP cURL Extension: Essential for API communication with OpenAI services
  • Comment Module: Must be enabled (Drupal core dependency)
  • Key Module: For secure API key storage and management

The module integrates with Drupal's core comment system and requires no additional external libraries beyond the OpenAI API access.

  • Devel: Helpful for debugging moderation workflows and testing custom policies during development
  • Admin Toolbar: Provides quick access to moderation configuration and flagged comments management
  • Views Bulk Operations: Enhances bulk moderation actions for processing multiple flagged comments efficiently
  • Mailsystem: Improves email notification formatting for moderation alerts and flag notifications
  • Token: Enables dynamic token replacement in notification emails and moderation messages

What differentiates this module is its integration with OpenAI's latest Omni models, comprehensive custom policy engine, intelligent risk-based status management, and seamless Views integration for efficient moderation workflows.

Community Documentation

  • Comprehensive README: Detailed documentation included with the module covering all features, configuration options, and troubleshooting guides
  • API Documentation: Inline code documentation for developers wanting to extend or integrate with the module

Depends on

Dependencies of the latest stable release

  • Key
  • comment Drupal core
  • field Drupal core
  • system Drupal core
  • user Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Mar 2026
Latest release
5 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.1 Stable 11 Mar 23, 2026
1.0.0 Stable 11 Mar 23, 2026