WordPress + OpenAI: natural comments, no awkward gaps
Your blog posts go live… and then they sit there. No comments. No signs of life. If you’ve ever stared at an “empty” comment section and felt that little credibility dip, you’re not imagining it.
This WordPress comment automation hits marketing managers first, but agency owners juggling client sites and solo bloggers trying to look established feel it too. You’ll generate realistic, on-topic comments and post them automatically, so your content doesn’t look abandoned.
Below, you’ll see exactly what the n8n workflow does, what you need to run it, and how to avoid the common mistakes that create spammy-looking comments.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: WordPress + OpenAI: natural comments, no awkward gaps
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch Articles from WordPress"]
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Build Article Comment Prompt", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Generate Article Comment (AI)", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Extract AI Output1", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Post Comment to Article"]
n4 --> n5
n2 --> n3
n1 --> n2
n3 --> n4
n0 --> n1
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n3 ai
class n1,n5 api
classDef customIcon fill:none,stroke:none
class n1,n5 customIcon
Why This Matters: Dead Comment Sections Hurt Trust
A quiet comment section makes a post feel untested. People read it, maybe even like it, but they don’t get that subtle social proof that says “others were here and found this useful.” For brands, it can look like you don’t have an audience yet. For agencies, it’s awkward when a client asks why their newest article has zero engagement after two weeks. And manually adding comments is a mess: you either forget, do it inconsistently, or write something that sounds forced (honestly worse than no comments at all).
The friction compounds. Here’s where it breaks down.
- You publish consistently, but commenting is irregular, so posts feel “cold” even when traffic is decent.
- When you do it manually, it’s easy to overdo it and end up with generic praise that reads like spam.
- Busy weeks happen, and then three or four posts in a row go out with zero engagement signals.
- There’s no repeatable process, which means you can’t maintain the same standard across multiple sites.
What You’ll Build: AI-Written Comments Posted to WordPress
This workflow pulls your published WordPress posts, builds a custom prompt from each post’s title, excerpt, and content, and asks OpenAI to write a short comment that sounds like a real person. Not everything is glowing praise. Some comments are neutral, some are a little longer, and some are quick reactions, which keeps the comment section from looking staged. After the AI responds, the workflow parses the result, assigns a commenter name and email, then submits the comment back to the correct WordPress post through the REST API. You can run it manually while testing, then schedule it so your site stays “alive” without you babysitting it.
The workflow starts with a trigger in n8n and immediately fetches your published posts from WordPress. OpenAI generates the comment text based on the post context, then n8n posts that comment back to WordPress using your API credentials. Clean loop. Minimal busywork.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you publish 5 posts a week and you want just 2 realistic comments on each post. Manually, even “quick” comments take about 5 minutes each once you open the post, write something relevant, and submit it, which is roughly 50 minutes a week. With this workflow: you trigger it in n8n (or schedule it), wait about a minute or two for OpenAI to respond, and the comments are posted automatically. That’s close to an hour back every week, and the site looks more active the whole time.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- WordPress with REST API enabled.
- OpenAI to generate the comment text.
- WordPress application password (create it in your WordPress user profile).
Skill level: Beginner. You’ll copy your site URL, connect credentials, and test a run.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A manual run (or schedule) triggers the workflow. In testing, you click “Execute” in n8n. Once you trust it, you run it on a timer so it checks posts automatically.
WordPress posts are retrieved via HTTP. The workflow calls your site’s REST API and pulls published articles, so it always has fresh context and doesn’t rely on you pasting content around.
The AI prompt is composed and sent to OpenAI. n8n builds a prompt using the title, excerpt, and content, then asks OpenAI to write one short, natural-sounding comment. Variation is the point here, so the comments don’t all feel like the same voice.
The comment is parsed and submitted back to WordPress. After OpenAI responds, n8n cleans the output, applies a commenter name/email, and posts the comment to the matching article through the WordPress API.
You can easily modify how many posts it processes at once and how “opinionated” the comments sound based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
This workflow starts manually so you can test comment generation on demand.
- Add the Manual Launch Trigger node as the starting point.
- Leave all fields at default settings in Manual Launch Trigger.
Step 2: Connect WordPress
Pull published posts from your WordPress site for comment creation.
- Add the Retrieve WordPress Posts node and connect it after Manual Launch Trigger.
- Set URL to
https://example.com/wp-json/wp/v2/posts?per_page=100&status=publish&_fields=id,title,excerpt,content,link,comment_status. - Set Authentication to
genericCredentialTypeand Generic Auth Type tohttpBasicAuth. - Credential Required: Connect your httpBasicAuth credentials for Retrieve WordPress Posts.
Step 3: Set Up AI Comment Creator
Build the prompt, generate an AI comment, and parse the model’s output.
- Add Compose Comment Prompt and connect it after Retrieve WordPress Posts.
- In Compose Comment Prompt, add a string field named prompt with the value
=={{ `For the article “${$json.title?.rendered || ''}”, write a short, natural comment (1 sentence) that is relevant. \nSummary: ${(($json.excerpt?.rendered || $json.content?.rendered || '')\n .replace(/<[^>]+>/g,' ')\n .replace(/\\s+/g,' ')\n .trim()).slice(0,300)}` }}\nComment characteristics:\n- If possible, use the article's keyword in the comment\n- Some positive, some neutral\n- Conversational tone, not formal\n- Some short, some long\n. - Add AI Comment Creator and connect it after Compose Comment Prompt.
- Set Model to
GPT-5and set the message content to=={{$json.prompt}}. - Credential Required: Connect your openAiApi credentials for AI Comment Creator.
- Add Parse AI Response after AI Comment Creator and set the comment field value to
={{$json.message?.content || $json.choices?.[0]?.message?.content || $json.content}}.
Step 4: Configure Submit Comment to Post
Post the generated comment back to WordPress using the REST API.
- Add Submit Comment to Post and connect it after Parse AI Response.
- Set URL to
https://example.com/wp-json/wp/v2/commentsand Method toPOST. - Enable Send Body and add body parameters: post =
={{ $('Retrieve WordPress Posts').item.json.id }}, content =={{ $('AI Comment Creator').item.json.message.content }}. - Set author_name to
={{ (() => {\n const first = ['John','Emily','Michael','Sophia','David','Olivia','Daniel','Ava','James','Isabella','Ethan','Mia','William','Charlotte','Benjamin','Amelia','Alexander','Harper','Lucas','Ella'];\n const last = ['Smith','Johnson','Williams','Brown','Jones','Garcia','Miller','Davis','Rodriguez','Martinez','Hernandez','Lopez','Gonzalez','Wilson','Anderson','Thomas','Taylor','Moore','Jackson','Martin'];\n return `${first[Math.floor(Math.random()*first.length)]} ${last[Math.floor(Math.random()*last.length)]}`;\n})() }}. - Set author_email to
={{ `guest+post${$items("Retrieve WordPress Posts")[$itemIndex()].json.id}-${Date.now()%100000}@[YOUR_EMAIL]`.toLowerCase() }}. - Credential Required: Connect your httpBasicAuth credentials for Submit Comment to Post.
[YOUR_EMAIL] with a valid domain to avoid comment rejection.Step 5: Test and Activate Your Workflow
Run a manual test to verify the post selection, AI response, and comment submission.
- Click Execute Workflow and trigger Manual Launch Trigger.
- Confirm Retrieve WordPress Posts outputs published posts and Compose Comment Prompt builds a valid prompt.
- Verify AI Comment Creator returns content and Parse AI Response extracts the comment field.
- Check your WordPress site to confirm Submit Comment to Post created a comment on the target post.
- When satisfied, toggle the workflow to Active for production use.
Troubleshooting Tips
- WordPress application passwords can be revoked or tied to the wrong user role. If posting fails, check your WordPress user profile first and confirm the account can moderate or create comments.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Quick Answers
About 30 minutes if you already have your WordPress and OpenAI credentials ready.
No. You connect WordPress and OpenAI, then paste your site URL into the workflow.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs, which are usually only a few cents for small batches of comments.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but do it intentionally. You can change the tone and length by editing the prompt in Compose Comment Prompt, and you can swap the model or settings in AI Comment Creator. Common tweaks include generating 2–3 comments per post (instead of one), limiting comments to specific categories, and rotating different “commenter personas” so the same names don’t show up repeatedly.
Usually it’s the application password or username not matching what WordPress expects. Regenerate the application password, confirm the account has the right permissions, and update the credentials in n8n. Also check your site URL carefully, because a missing https or a redirected domain can break REST API calls. If you use security plugins, they may block the REST endpoint until you allowlist your requests.
On a typical small site, it can run through dozens of posts in a single execution without issues.
Often, yes, because this kind of flow benefits from more control over prompts, parsing, and API requests. n8n also gives you a self-hosted option, which matters if you don’t want to pay more as volume grows. Zapier or Make can still work if you keep it simple, but complex “fetch posts, generate text, clean output, then post” chains get clunky fast. If compliance matters, self-hosting can be the deciding factor since you control where the data flows. Talk to an automation expert if you’re not sure which fits.
Your posts can look active without you faking it by hand. Set this up once, schedule it, and move on to work that actually grows the site.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.