Automated WordPress post tagging with AI analysis and Claude Opus 4.5
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 (13)
- Manual Trigger
n8n-nodes-base.manualTrigger - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Merge
n8n-nodes-base.merge - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Split Out
n8n-nodes-base.splitOut - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Wordpress
n8n-nodes-base.wordpress - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Aggregate
n8n-nodes-base.aggregate - Code
n8n-nodes-base.code - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic
What it does
This workflow automates the full process of generating, creating, and assigning optimized WordPress tags to a specific blog post. It uses a combination of WordPress API actions, AI analysis (Claude Opus 4.5), and internal data cleaning to ensure SEO-friendly, consistent, and properly structured tags. --- Key Features ✅ 1. Full Tag Automation The workflow removes the need for manual tag selection or creation. It automatically: Reads the article content Chooses relevant existing tags Creates new SEO-optimized ones Assigns them to the article This eliminates human error and saves significant editorial time. ✅ 2. AI-Optimized SEO Thanks to the integrated Claude analysis, tags are: Semantically relevant Optimized for search intent Designed to improve discoverability and CTR Adapted to the specific content structure This allows for a much higher SEO quality compared to manual tagging. ✅ 3. Intelligent Tag Management The system ensures: A maximum of 4 total tags No irrelevant or duplicate tags Tags follow naming conventions (e.g., multi-word or acronyms) This creates a clean, consistent tag taxonomy across the WordPress site. ✅ 4. Automated Tag Creation in WordPress New tags are automatically created directly in WordPress via API, ensuring: Perfect synchronization with your CMS No need to manually add new tags from the WordPress backend Immediate availability for future posts ✅ 5. Clean and Reliable Data Handling Custom code nodes and aggregation steps: Merge tag arrays safely Remove duplicates Produce clean, valid JSON outputs This makes the workflow stable even with large or complex tag lists. ✅ 6. Modular and Scalable Architecture Every step (fetching, AI analysis, creation, merge, update) is separated into independent nodes, making it easy to: Extend the workflow (e.g., add categories, multilingual tags, taxonomy validation) Plug in different AI models Reuse the structure for other WordPress automations ✅ 7. Consistent Output Validation The Structured Output Parser ensures: Correct JSON schema Safe handling of AI output No malformed data sent to WordPress This makes the automation robust and production-ready. --- How it works This workflow is an intelligent, AI-powered tag suggestion and assignment system for WordPress. It automates the process of analyzing a blog post's content and assigning the most relevant tags, creating new ones if necessary. 1. Data Retrieval & Preparation: The workflow starts by fetching a specific WordPress article using a provided postid. Simultaneously, it retrieves all existing tags from the WordPress site via the REST API. These two data streams are then merged into a single data structure. 2. AI-Powered Tag Analysis: The merged data (article content and existing tag list) is sent to an LLM (Claude Opus 4.5). The AI acts as an "SEO expert," analyzing the article's title, content, and excerpt. It follows a strict set of instructions to select up to 4 relevant tags from the existing list and, if needed, suggests new tag names to reach a total of 4 tags. 3. Tag Processing & Creation: The workflow splits the AI's output into two paths: Existing Tags: The list of selected tag IDs is prepared for the final update. New Tags: The list of new tag names is processed in a loop. For each new tag, the workflow sends a POST request to the WordPress API to create it. The newly created tag IDs are collected. 4. Final Assignment: The existing tag IDs and the newly created tag IDs are merged into a single list. This final list of tag IDs is then sent back to the original WordPress article via an "Update" operation, effectively tagging the post. --- Set up steps To configure and run this workflow, follow these steps: 1. Provide Input Data: In the "Set data" node, you must configure the two required assignment fields: postid: Set this to the numerical ID of the WordPress post you want to analyze and tag. url: Set this to the base URL of your WordPress site (e.g., https://yourwebsite.com/). 2. Configure WordPress Credenti