# WordPress comment moderation as a workflow

<!-- meta: path=/use-cases/wordpress-comment-moderation; page=wordpress-comment-moderation; lang=en -->

## Overview

Build a WordPress comment moderation workflow: comment_post trigger, If or AI screening, then approve, spam, or notify — no custom plugin.

Use the WordPress workflow builder when a comment is posted: screen, notify, or mark it spam — without a moderation plugin.

## The job

A comment lands on a WordPress post. You want a human or an AI step to decide: approve, hold, spam, or page someone. Doing that in functions.php hides the policy. Doing it on a canvas makes the policy a workflow you can show a client.

## The flow

Start from the WordPress comment_post hook. Map comment content, author, and post id. Then branch.

- Comment Posted (comment_post) starts the flow
- If checks length, links, or a denylist — or an AI node scores the text
- Approve Comment or a spam/delete action applies the decision
- Send Email / Slack notifies editors only when the branch is “needs a human”

- [Comment Posted](/nodes/event-wp-comment_post) — Start when a comment lands
- [If](/nodes/if) — Branch on length, links, or a score
- [Approve Comment](/nodes/wp-approve-comment) — Apply the decision on the post
- [Send Email](/nodes/send-email) — Page someone only when needed

## Why this belongs in a workflow builder

Comment policy changes weekly. On a canvas you retune the If node or the AI prompt without shipping a plugin update. The same pattern extends to edit_comment and spam_comment triggers when you want a full moderation loop.

- [WordPress workflow builder](/wordpress-workflow-builder) — Posts, users, and the rest of the WP palette

## FAQ

### Does this replace Akismet?

It can sit beside it. Use the flow for routing and notifications; keep a spam filter if you already trust one. The builder’s job is the visible policy, not a magic spam model.

### Can I run this only on some post types?

Yes. Filter on the Design tab or add an If node that checks post type from the trigger payload.

## Related pages

- [WordPress workflow builder](/wordpress-workflow-builder) — Posts, comments, and users
- [save_post trigger](/nodes/event-wp-save_post) — Same idea for posts
