drupal / ai_recipe_comment_spam
Adds AI-powered spam scoring, reasoning and auto-unpublishing for comments, with a moderation triage view.
Package info
git.drupalcode.org/project/ai_recipe_comment_spam.git
Type:drupal-recipe
pkg:composer/drupal/ai_recipe_comment_spam
Requires
- drupal/ai: ^1.4
- drupal/core: ^11.2
- drupal/custom_field: ^4.0
- drupal/token: ^1.15
This package is not auto-updated.
Last update: 2026-07-09 03:46:30 UTC
README
What it does
AI Comment Spam Moderation adds an AI-assisted workflow for comments. It scores each incoming comment for spam risk, saves the score and a one-sentence reasoning, automatically unpublishes likely spam, and surfaces everything in a moderation triage view.
Why it matters
Site moderators can triage comment spam faster and reduce manual review effort. Obvious spam is unpublished automatically, while borderline cases stay visible with clear, AI-generated reasoning for a human to act on.
How it works
When applied, the recipe configures:
- core comment support using the default
commentcomment type (via the corearticle_commentrecipe), - a Custom Field on comments (
field_spam_assessment) holding aspam_score(1-10) and aspam_reasoningsentence, - an AI automator on
field_spam_assessmentthat reads the comment body and writes the score and reasoning (reasoning is the literalokwhen the score is below 5), - a second AI automator that unpublishes the comment when the
spam_scoreis 8 or higher, - a dedicated listing at
/admin/content/ai-comment-spamfor moderation triage.
Requirements & compatibility
- Drupal core:
^11.2 - AI module:
^1.4 - Custom Field:
^4.0 - Token:
^1.15
How to get started
- Install module dependencies (including AI and AI Automators).
- Configure an AI provider/model and set a default for
chat_with_complex_json. - Apply the recipe.
- Post comments on an Article and verify the spam score and reasoning are saved, and that high-scoring comments are unpublished.
- Use
/admin/content/ai-comment-spamfor moderation triage.