Generate missing WordPress post excerpts with OpenAI Chat Completions
Ready for 3.0What this workflow does
This workflow has 14 nodes and runs on a schedule (every week at 09:00) (plus 1 other trigger). Along the way it connects Wordpress. It also calls api.openai.com over HTTP.
How it runs
Trigger: On a schedule (every week at 09:00) (plus 1 other trigger).
- Workflow Configuration (Edit Fields (Set)): sets 6 fields: siteUrl, postsToScan, maxPostsPerRun…
- Get Posts from WordPress (Wordpress): get many (post)
- Keep Posts Without Excerpt (Filter): keeps only the items that match a condition
- Limit: keeps the first few items
- Prepare Post Text (Edit Fields (Set)): sets 3 fields: postId, title, plainText
- Write Excerpt with OpenAI (HTTP Request): calls api.openai.com (POST)
- Validate AI Excerpt (Code): runs custom JavaScript code
- Is Excerpt Valid? (If): checks a condition and branches into true / false
- Is Dry Run Enabled? (If): checks a condition and branches into true / false
- Save Excerpt to WordPress (HTTP Request): calls an HTTP API (POST)
Services it uses
Other WordPress + OpenAI templates (91)
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 (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
From the author
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…