Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Content Writing & Generation

Content Writing & Generation

Generate missing WordPress post excerpts with OpenAI and the REST API

Runs weekly or on demand to find published WordPress posts without an excerpt, has OpenAI write one in the post's language, and saves it back via REST API after a dry run.

What it does

# Generate missing excerpts for WordPress posts with OpenAI ## Who's it for WordPress site owners, content marketers and SEO teams with many posts that have no hand-written excerpt. ## How it works Every week, or on demand, the workflow fetches your latest posts and keeps published ones that have no excerpt and enough content. OpenAI then writes a short plain-text excerpt in the same language as the post. Dry run mode is on by default and only shows the generated excerpts, so nothing changes on your site. When you turn it off, each excerpt is saved back to WordPress through the REST API. Invalid AI output is skipped. ## How to set up 1. In WordPress, open Users, Profile, Application Passwords and create a new password. 2. Add your WordPress API and OpenAI credentials in n8n. 3. Open the Workflow Configuration node and set your site URL, posts to scan, posts per run, model and excerpt length. 4. Click Execute workflow with dryRun set to true and review the excerpts. 5. Set dryRun to false and activate the workflow. ## Requirements - WordPress 5.6 or higher with the REST API and Application Passwords enabled - OpenAI API key - n8n Cloud or self-hosted n8n ## How to customize the workflow - Edit the prompt to match your brand voice. - Change the schedule or the number of posts per run. - Add a Slack or email step to report which posts were updated.

The steps

  1. Run Manually
  2. Run Weekly
  3. Workflow Configuration
  4. Get Posts from WordPress
  5. Keep Posts Without Excerpt
  6. Limit Posts Per Run
  7. Prepare Post Text
  8. Write Excerpt with OpenAI
  9. Validate AI Excerpt
  10. Is Excerpt Valid?
  11. Is Dry Run Enabled?
  12. Save Excerpt to WordPress
  13. Preview Only - No Changes Saved
  14. Skip Invalid AI Output

Similar automations