Back to Templates

Create SEO-ready WordPress blog drafts with Claude, Imagen and Slack

Created by

Created by: Triple 8 Labs || triple8labs
Triple 8 Labs

Last update

Last update a day ago

Categories

Share


Quick Overview

This workflow receives an article brief via webhook, uses Anthropic Claude to generate SEO-ready HTML content, optionally creates a featured image with Google Imagen, then creates a draft post in WordPress with tags and Rank Math SEO metadata and optionally posts a completion message to Slack.

How it works

  1. Receives a POST webhook request containing an article prompt (and optional title/content/category and writing guides) and optionally validates a Bearer token.
  2. Builds a structured prompt from your tone and style guides and sends it to Anthropic Claude to generate a JSON payload with the article HTML, excerpt, tags, and SEO fields.
  3. Optionally generates a 16:9 featured image with Google Imagen based on the returned image subject, then uploads it to WordPress media and sets its alt text.
  4. Creates or reuses WordPress tags from the generated tag list, collects their IDs, and creates a WordPress post in draft status with the chosen category, author, and featured media.
  5. Updates the draft post with Rank Math SEO meta fields (focus keyword, SEO title, and meta description) via the WordPress REST API.
  6. Optionally sends a Slack message with the draft title, edit link, tags, and affiliate note, then returns a JSON webhook response with the created post ID and draft URL.

Setup

  1. Add credentials for Anthropic, Google AI (PaLM/Imagen), WordPress, and Slack (Slack is required if you enable notifications).
  2. Update the CONFIG values for your WordPress site URL, default category ID, author ID, and (optionally) a Slack channel ID and a webhook Bearer token secret.
  3. If you want featured images, keep image generation enabled and ensure your Google AI project has access to the configured Imagen model.
  4. If you want Rank Math fields to be written via the REST API, install Rank Math and add a mu-plugin that exposes the Rank Math meta fields on posts.
  5. Copy the webhook URL for the article-publisher endpoint and send POST requests with at least a prompt field to generate new drafts.