Triage held WordPress comments with OpenAI spam classification and auto-marking
Ready for 3.0What this workflow does
This workflow has 13 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). It uses only n8n's built-in nodes. It also calls api.openai.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Config (Edit Fields (Set)): sets 5 fields: siteUrl, maxCommentsPerRun, openAiModel…
- Get held comments (HTTP Request): calls an HTTP API (GET)
- Prepare comments (Code): runs custom JavaScript code
- Classify comment with OpenAI (HTTP Request): calls api.openai.com (POST)
- Parse classification (Code): runs custom JavaScript code
- Confident spam? (If): checks a condition and branches into true / false
- Dry run enabled? (If): checks a condition and branches into true / false
- Needs human review (Edit Fields (Set)): sets 7 fields: commentId, category, confidence…
- Dry run result (Edit Fields (Set)): sets 5 fields: commentId, category, confidence…
- Mark comment as spam (HTTP Request): calls an HTTP API (POST)
…plus 1 more step. See the full node list below.
HTTP calls to: api.openai.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Manual Trigger
n8n-nodes-base.manualTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if
From the author
Quick overview This workflow runs manually or every 3 hours to fetch held WordPress comments, uses OpenAI to classify them with a confidence score, and marks only high-confidence spam as spam in WordPress while leaving all other comments in the moderation…