Generate missing WordPress post excerpts with OpenAI Chat Completions
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (10)
- Manual Trigger
n8n-nodes-base.manualTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Wordpress
n8n-nodes-base.wordpress - Filter
n8n-nodes-base.filter - Limit
n8n-nodes-base.limit - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp
What it does
Quick overview This workflow runs manually or weekly to find published WordPress posts missing excerpts, generates plain-text excerpts with OpenAI Chat Completions, and optionally saves the validated excerpts back to WordPress via the REST API. How it works 1. Runs either on a weekly schedule or when triggered manually. 2. Fetches a configurable number of WordPress posts in edit context and keeps only published posts with an empty excerpt and at least 200 characters of content. 3. Limits the batch size per run, strips HTML from each post, and prepares plain text for prompting. 4. Calls the OpenAI Chat Completions API to generate a JSON-formatted excerpt in the post’s language with a configurable word limit. 5. Parses and validates the AI response, skipping posts where the excerpt is missing or outside the allowed length range. 6. If dry-run mode is enabled, outputs the generated excerpts for review; otherwise, updates each post’s excerpt in WordPress via the REST API. Setup 1. Create a WordPress Application Password for a user with permission to edit posts and add a WordPress API credential in n8n. 2. Add an OpenAI API credential in n8n. 3. In the workflow configuration, set your site URL, posts-to-scan and per-run limits, OpenAI model, excerpt word limit, and whether dryRun is enabled.