AI Automation

AI Content Pipeline Tools: From Keyword Research to WordPress Publishing and Reporting

Which tools automate an AI content pipeline? Keyword APIs, an LLM, human review, the WordPress REST API and Search Console reporting, with Python code.

Muhammad Yahya, authorMuhammad Yahya8 min read

An AI content pipeline from keyword research to WordPress is automated with one category of tool per stage: a keyword data API such as Google Search Console, the Google Ads API or DataForSEO for research, an LLM API for briefs and drafts, a human approval queue for review, the WordPress REST API for publishing, the Search Console and GA4 Data APIs for reporting, and n8n, Zapier or a scheduled Python script to connect them.

You can buy this as one product or assemble it from parts. Either way, a person should approve every article before it goes live.

The short answer, stage by stage

  • Keyword research: the Search Console API shows queries you already appear for, while the Google Ads API, DataForSEO, Semrush and Ahrefs supply new ideas and keyword metrics.
  • Brief: an LLM turns the keyword, the search intent and your source notes into an outline a reviewer can reject early.
  • Drafting: an LLM API writes from the approved brief, using prompts that fix structure, tone and on-page SEO.
  • Review: a person works through an approval queue, such as a shared sheet or the WordPress pending status.
  • Publishing: the WordPress REST API creates the post through POST /wp-json/wp/v2/posts.
  • Reporting: scheduled calls to the Search Console API and the GA4 Data API runReport method record how each article performs.
  • Orchestration: n8n, Zapier or a scheduled Python script moves each item between stages and handles failures.

Where the keyword data comes from

If the site has any search history, start with Search Console. Its searchanalytics.query method groups by query and page and returns up to 25,000 rows per request, showing the queries Google already associates with your pages.

For new ideas, the Google Ads API offers KeywordPlanIdeaService, seeded by up to 20 keywords, a URL or a whole site. Many setup guides are now out of date: Google sunset developer tokens on September 9, 2026, and access now belongs to your Google Cloud project. The Explorer level restricts keyword planning, so you need Basic or Standard access.

Third-party APIs skip that review. DataForSEO's Keywords For Keywords endpoint takes up to 20 seed keywords per request. As of November 9, 2026, Semrush's Standard API needs an SEO Business plan plus purchased units, and Ahrefs API v3 needs a Lite or higher plan.

How the stages connect

A reliable AI content automation workflow treats each article as one record that moves through statuses, not a script that runs top to bottom. A database table or even a spreadsheet is enough:

  1. 1A scheduled job saves keyword candidates as new.
  2. 2A person marks the ones worth writing as chosen.
  3. 3The LLM writes a brief and then a draft against the record.
  4. 4A reviewer approves, edits or rejects the draft.
  5. 5An approved record becomes a WordPress post, and its ID and URL are saved.
  6. 6A scheduled job writes Search Console and GA4 numbers against that URL.
  7. 7Pages with many impressions and few clicks return to the queue for a rewrite.

Saved state is what makes this a pipeline: a failed API call retries one record rather than the whole batch, and an article with a post ID is not created twice.

The LLM call is the simple part. With the Anthropic Python SDK it is one client.messages.create call with a model such as claude-sonnet-5-5, a max_tokens limit and your prompt in messages. Keep your prompts in version control.

I built this kind of system for a client in marketing and SEO who wanted the process automated without losing editorial control. That AI SEO content pipeline, built with Python, an LLM, prompt engineering and the WordPress API, automated keyword research as the starting point, generated articles from the chosen keywords using engineered prompts for structure, tone and on-page SEO, added an approval step and created WordPress drafts automatically once approved. Reporting was not part of that project.

Build or buy: no-code versus custom Python

There are three realistic routes for keyword research to WordPress automation:

  • All-in-one plugin or platform: the fastest start, but check that you can turn off auto-publishing, edit the prompts and export your data.
  • No-code workflow: n8n has a WordPress node that can create, get and update posts, and Zapier's WordPress integration includes a Create Post action.
  • Custom Python: more to build, but you get validation rules, per-record retries, data joins for reporting, tests and version control.

No-code suits lower volume and simple branching, and my comparison of Zapier, n8n and custom Python covers pricing and a hybrid pattern. Custom code earns its cost once the logic outgrows a visual canvas, which is the kind of system I build as part of AI workflow automation.

The WordPress publishing step in Python

WordPress has shipped with Application Passwords since version 5.6. You generate one from the user's edit screen in wp-admin and send it with HTTP Basic Auth. By default they are available on sites served over HTTPS. This script uses requests to create a draft through the posts endpoint, reading credentials from environment variables:

import os

import requests

SITE = os.environ["WP_SITE_URL"].rstrip("/")  # for example https://example.com
USER = os.environ["WP_USER"]
APP_PASSWORD = os.environ["WP_APP_PASSWORD"]


def create_draft(title: str, html: str, slug: str) -> int:
    """Create a WordPress draft and return its post ID."""
    response = requests.post(
        f"{SITE}/wp-json/wp/v2/posts",
        auth=(USER, APP_PASSWORD),
        json={"title": title, "content": html, "slug": slug, "status": "draft"},
        timeout=30,
    )
    response.raise_for_status()  # a 401 or 403 stops the run here
    return response.json()["id"]


if __name__ == "__main__":
    post_id = create_draft(
        title="Pipeline test draft",
        html="<p>Created through the WordPress REST API.</p>",
        slug="pipeline-test-draft",
    )
    print(f"Draft created: {SITE}/wp-admin/post.php?post={post_id}&action=edit")

The status field accepts publish, future, draft, pending and private. Use draft when an editor will keep working on the post, and pending to mark it as waiting for someone with the publish_posts capability.

Let WordPress enforce the rule. Give the pipeline its own user with the Contributor role. WordPress requires publish_posts for publish, future and private, so draft and pending succeed while a publish attempt fails with rest_cannot_publish. A bug or bad prompt then cannot put an article live. Contributors also lack upload_files, so add images during review.

The human approval step and why it matters

Google does not ban AI content. Its Search team puts it this way: "Appropriate use of AI or automation is not against our guidelines." It also says its focus is on the quality of content rather than how content is produced.

The limit is scale without value. Google's spam policies list using generative AI tools "to generate many pages without adding value for users" as an example of scaled content abuse. Its guidance on generative AI content adds: "It is critical to manually factcheck and review all AI-generated content for accuracy and trustworthiness before publishing." That review also covers titles, meta descriptions, structured data and image alt text.

Before approving, a reviewer should answer yes to each of these:

  • Is every fact, figure and claim correct and traceable to a source?
  • Does the article add something a model could not produce alone, such as original data or first-hand experience?
  • Does it serve the search intent better than the pages already ranking?

Set your publishing volume by what reviewers can genuinely check, not by how fast the model writes.

Reporting after publishing

Run a scheduled job, for example weekly, that calls two APIs with read-only access:

  • Search Console: searchanalytics.query grouped by page and query returns clicks, impressions, CTR and position, using the webmasters.readonly scope.
  • GA4 Data API: runReport with the landingPage dimension and metrics such as sessions, engagementRate and keyEvents, using the analytics.readonly scope.

Search Console data is normally available in two to three days, so end your date range a few days before the run date. And Search Console reports full page URLs while GA4's landingPage gives a path, so normalize both before joining them.

Write the numbers back against each post's record and flag pages with many impressions and few clicks for a rewrite. A spreadsheet is enough for a small team, and my guide to automating Excel reports with Python shows the approach.

Common mistakes

  • Prompting from the keyword alone. A keyword contains no facts, so give the model your source notes, data and examples.
  • Sending Markdown as the post body. Models often answer in Markdown, while WordPress blocks serialize to HTML, so convert it before the API call.
  • Assuming SEO plugin fields are writable. A meta key is only available through the REST API when registered with show_in_rest, so test it first.
  • Not saving the post ID. Without it, retries create duplicates and reports cannot be tied to the pipeline.

What it costs to run

The running cost has four parts: LLM tokens, keyword data, wherever the orchestrator runs, and reviewer time. I am not quoting a per-article figure because it depends on article length, drafts per article and your choice of model. Estimate the token part at current prices with the LLM API cost calculator.

Drafting rarely needs an instant response, so it suits batch processing: Anthropic's Message Batches API cuts costs by 50 percent, and most batches finish within an hour. Reviewer time never shows up on an API bill, but it belongs in the budget.

If your content process still depends on copying between tools, describe your workflow to me: where the keywords come from, who approves articles and where they get published. I will tell you which stages are worth automating first and which should stay with a person.

Frequently asked questions

Does Google penalize AI-generated content?

Not for being AI-generated. Google says appropriate use of AI or automation is not against its guidelines and that it focuses on the quality of content rather than how it is produced. Using AI to generate many pages without adding value for users can violate its scaled content abuse policy.

Can WordPress create posts through an API without a plugin?

Yes. The WordPress REST API creates posts through a POST request to /wp-json/wp/v2/posts, and since version 5.6 WordPress has shipped with Application Passwords for authenticating external scripts.

What is the difference between draft and pending in WordPress?

A draft is an incomplete post, while pending means the post is awaiting a user with the publish_posts capability, typically an Editor, to publish it. A pipeline can create either one through the REST API, and a Contributor account can create both but cannot publish.

Do you need a developer token to get keyword ideas from the Google Ads API?

No. Google sunset developer tokens on September 9, 2026, and API access levels now belong to your Google Cloud project. KeywordPlanIdeaService is restricted at the Explorer level, so you need Basic or Standard access.

Related reading

Muhammad Yahya

Written by Muhammad Yahya

Python Automation & Backend Developer. Top Rated on Upwork with a 100% Job Success Score and 5+ years building automations, AI workflows and production backends.

Hire Me on Upwork

More articles