🎬 Automated WordPress post tagging with AI analysis and Claude Opus 4.5

355 views · 🎬 Content Creation & Video

Description

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:

This eliminates human error and saves significant editorial time.

2. AI-Optimized SEO

Thanks to the integrated Claude analysis, tags are:

This allows for a much higher SEO quality compared to manual tagging.

3. Intelligent Tag Management

The system ensures:

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:

5. Clean and Reliable Data Handling

Custom code nodes and aggregation steps:

6. Modular and Scalable Architecture

Every step (fetching, AI analysis, creation, merge, update) is separated into independent nodes, making it easy to:

7. Consistent Output Validation

The Structured Output Parser ensures:

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 post_id. 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:

    • post_id: 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 Credentials: Ensure that the “Wordpress” and “HTTP Request” nodes are correctly linked to a valid set of WordPress credentials within n8n. These credentials must have the necessary permissions to read and update posts, as well as create new tags.

  3. Configure Claude Opus 4.5 Credentials: Verify that the “Claude Chat Model” nodes are linked to a valid Claude API key credential in n8n.

  4. Execute: Once the credentials and input data are set, click “Execute Workflow” on the manual trigger node to run the process. The workflow will fetch the article, analyze it with AI, create any new tags, and update the post with the final selection of tags.


Need help customizing?

Contact me for consulting and support or add me on Linkedin.

🔗 Nodes Used

HTTP Request, Wordpress, Basic LLM Chain, Anthropic Chat Model, OpenAI Chat Model, Structured Output Parser

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup