Templates / Generate missing WordPress post excerpts with OpenAI Chat Completions

Generate missing WordPress post excerpts with OpenAI Chat Completions

Ready for 3.0

by Bincy Bhanu. S ✓ · 0 views · created 2026-10-13 · Content Creation, Multimodal AI

Ready 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)

Wordpress

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.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.