Generate missing WordPress image alt text with OpenAI vision
Ready for 3.0What this workflow does
This workflow has 13 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). It uses only n8n's built-in nodes. It also calls api.openai.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Config (Edit Fields (Set)): sets 7 fields: siteUrl, imagesToScan, maxImagesPerRun…
- Get media library images (HTTP Request): calls an HTTP API (GET)
- Select images missing alt text (Code): runs custom JavaScript code
- Generate alt text with OpenAI (HTTP Request): calls api.openai.com (POST)
- Validate alt text (Code): runs custom JavaScript code
- Is alt text valid? (If): checks a condition and branches into true / false
- Dry run enabled? (If): checks a condition and branches into true / false
- Skipped result (Edit Fields (Set)): sets 3 fields: id, reason, result
- Dry run result (Edit Fields (Set)): sets 4 fields: id, imageUrl, proposedAltText…
- Save alt text to WordPress (HTTP Request): calls an HTTP API (POST)
…plus 1 more step. See the full node list below.
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 (6)
- Manual Trigger
n8n-nodes-base.manualTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if
From the author
Quick overview This workflow runs manually or every Monday at 9am, finds WordPress media library images missing alt text, generates concise descriptions with the OpenAI Chat Completions API using vision, validates the results, and optionally writes the alt…