Skip to content

Daily

Turn a blog plan sheet into WordPress drafts

Each morning the next topic in your blog plan sheet becomes an SEO article draft in WordPress, with the link written back to the sheet.

Runs
Daily
Apps
Google Sheets, WordPress
AI
Yes, uses the built-in AI allowance
Access
Sheets edit; WordPress author/editor application password

Send this to your assistant

Create a ClickRuntime automation: every day at 8am, take the next topic from my Blog plan sheet, write an SEO article with title, meta description and headings, create it as a WordPress draft and put the link in the sheet.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

The owner of an online garden supply shop knows blog posts bring in search traffic, and has a sheet with forty topics like "when to plant garlic" and "best soil for raised beds". Writing even one a week alongside running the shop has proved impossible, so the sheet has not moved in months.

This automation works through it. Every morning it takes the next topic, AI writes an article with a title, meta description and headings, and the post is created as a draft in WordPress. The sheet row gets the draft link, and an email lets the owner know one is ready to read and publish.

What you get out of it

  • Your content plan, actually happening

    A draft every morning turns a stalled list into a steady stream of articles. Search traffic builds as the posts go live.

  • Editing instead of writing

    Reviewing and adding a personal touch to a draft takes a fraction of the time of writing from nothing. You stay the expert; the first draft is done for you.

  • Nothing goes live unseen

    Posts are created as drafts, so you read and approve each one. Your site's voice and accuracy stay under your control.

  • Status at a glance

    The sheet shows which topics are drafted and links to each draft. It doubles as your editorial calendar.

How it works

What happens, step by step

  1. Every morning, ClickRuntime reads your Blog plan sheet and picks the next topic without a link.

  2. AI writes an article for it with a title, meta description and headings.

  3. The article is created as a draft post in WordPress.

  4. The draft link is written into the sheet, and you get an email saying it is ready to review.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect WordPress

What you get

RunsDaily
Turn a blog plan sheet into WordPress draftstoday, 9:00Succeeded
Email · Draft readyDraft ready: When to Plant Garlic for the Biggest Bulbs. blog.example.com/wp-admin/post.php?post=812

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Google Sheets and WordPress steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
write_and_publish_seo_blog_posts_from_a_sheet_of_topics.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, notify

SHEET_ID = "your-spreadsheet-id"
WP = "https://blog.example.com/wp-json/wp/v2"

def wp(method, path, **kw):
    r = http.request(method, f"{WP}/{path}", auth=(credentials.secret("WP_USER"), credentials.secret("WP_APP_PASSWORD")), **kw)
    r.raise_for_status()
    return r.json()

@on_trigger
def run(event):
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
    rows = sheets.values().get(spreadsheetId=SHEET_ID, range="Blog plan!A2:B").execute().get("values", [])
    nxt = next(((i + 2, r[0]) for i, r in enumerate(rows) if r and r[0] and len(r) < 2), None)
    if not nxt:
        return {"drafted": False}
    row, topic = nxt
    schema = {"type": "object", "properties": {k: {"type": "string"} for k in ["title", "meta_description", "body_html"]}, "required": ["title", "meta_description", "body_html"]}
    art = ai.generate(f"Write an SEO article about '{topic}', about 1000 words, H2 headings, HTML body.", json_schema=schema, max_output_tokens=2048).json
    post = wp("POST", "posts", json={"title": art["title"], "content": art["body_html"], "excerpt": art["meta_description"], "status": "draft"})
    link = f"https://blog.example.com/wp-admin/post.php?post={post['id']}&action=edit"
    sheets.values().update(spreadsheetId=SHEET_ID, range=f"Blog plan!B{row}", valueInputOption="RAW", body={"values": [[link]]}).execute()
    notify.email_me(f"Draft ready: {art['title']}", link)
    return {"drafted": topic}

FAQ

Common questions

Does it fill in the SEO fields?
It writes a meta description and puts it in the post excerpt. If you use an SEO plugin, the description can go into that plugin's field instead.
Can it set categories and tags?
Yes. Add a category column to the sheet and the draft is filed under it.
How long are the articles?
About 1,000 words by default, with headings. You can ask for shorter or longer posts.
What permissions does it need?
Sheets edit; WordPress author/editor application password. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Turn a blog plan sheet into WordPress drafts” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.